Free quiz · 47 questions in the bank

Design Patterns Quiz

Answer 10 random questions about Design Patterns, then see your score and why each answer is right. Every attempt draws a new set.

Sample questions

  1. Your checkout has a growing if/else that picks how shipping is calculated (standard, express, pickup). Which pattern removes it most directly?
  2. An Order class has the same switch (status) in pay(), ship() and cancel(). Which pattern fits best?
  3. You must use a legacy billing library whose submit(amount_string) doesn't match your charge(cents) interface. Which pattern?
  4. You want to add logging, caching and retries around an HTTP client, in different combinations for different callers, without changing the client class. Which pattern?
  5. When an order is placed, email, inventory and analytics must react, and more reactions will be added later. Inside one application, which pattern fits?

All quizzes · Sign in to save your scores and get the questions you miss back in Daily Review.

Was this page helpful?