Skip to content

Latest commit

 

History

History
168 lines (107 loc) · 4.85 KB

File metadata and controls

168 lines (107 loc) · 4.85 KB

QuizHero Demonstration

See our GitHub repository:

Rules to write your quiz --- simple as original Markdown syntax:

> Question: Which framework do you use to develop your backend server?
* [ ] A. SpringBoot
* [x] B. Javalin
* [ ] C. SparkJava
* [ ] D. Tomcat

Notes: this is my private notes. The student can not see that.


Start Presenter Mode!

  • Press Option + P to open presenter mode. Open a second audience window & view your private notes to better support your presentation.

202004291524presenter_mode


Share with your students!

  • Share the file code with your students so they can fetch the presentation slides!

202004290306stu_view


Start quiz and view statistics

  • click start quiz button to release quiz permission (Students won't be able to take quiz without permission.)

202004290301ins_quiz_stat


Contents of the course: let's start!

  • Design Principles: SOLID

  • Several Funny Quizzes!

Notes: This feature is fantastic. Only I can see the notes in presenter mode.


What are design principles?

A good software design organizes the code in a way that it is "easy to understand, change, maintain and reuse."

Design principles are (often opinionated) guidelines derived from experience of programmers about software design that usually take the form of do's and don'ts. They are the Commandments of OO Programming.


The SOLID design principles

The SOLID design principles are some of the best-known design principles in object-oriented software development. SOLID is a mnemonic acronym for the following five principles:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

Open/Closed Principle

Classes should be open for extension but closed for modification.

Essentially means design your application in a way to keep existing code from breaking when you implement new features.

  • "Open to extension" means you can add new features.
  • "Closed to modification" means the existing code (before adding a new feature) does not have to be modified when you added the new features.

A good design example of Open/Closed Principle

bXGiP7R

  • New functionality does not require a rewrite of existing code
  • Also applies Dependency Inversion Principle (DIP)

Quiz Part 1: Are you ready?


Question: What is your favorite course?

  • A. AI
  • B. OOSE
  • C. Algorithm
  • D. Computer Network

Question: Which design principles do you apply?

  • A. Single Responsibility Principle
  • B. Open/Closed Principle
  • C. Liskov Substitution Principle
  • D. Interface Segregation Principle

Dependency Inversion Principle

High-level classes shouldn’t have to change because low-level classes change.

The dependency inversion principle does not only change the direction of the dependency; it splits the dependency between the high-level and low-level modules by introducing an abstraction between them. So in the end, you get two dependencies:

  • the high-level module depends on the abstraction, and
  • the low-level depends on the same abstraction.

Quiz Part 2: Go for it!


Question: Which SOLID design principle is most closely described by the given statement: classes should depend on abstractions rather than implementations.

  • A. Interface Segregation Principle
  • B. Open/Closed Principle.
  • C. Liskov Substitution Principle.
  • D. Dependency Inversion Principle

Question: Which is one of the most widely used java design pattern?

  • A. Composite Pattern
  • B. Dependency Injection Pattern
  • C. Factory Pattern
  • D. Singleton Pattern

Question: Which framework do you use to develop your backend server?

  • A. SpringBoot
  • B. Javalin
  • C. SparkJava
  • D. Tomcat

Hope you enjoy QuizHero!

  • Feel excited? Start writing your own presentation slides!!

202004290230ins_view_slides

Notes: this is my private notes. The student can not see that.