19 quizzes
Which design pattern is best for decoupling the sender of a request from the object that performs the request?
A fitness app wants multiple modules to receive updates whenever new health data arrives. Which pattern is most suitable?
Which pattern should you use to allow a playlist to be traversed in multiple ways without exposing the internal song list?
You need several algorithms for calculating shipping costs in your e-commerce app. Which pattern offers the best flexibility?
A vending machine changes its logic based on whether money has been inserted. What's the most appropriate pattern for this?
If you want to compose a request-processing pipeline where each handler may process or pass the request along, which pattern fits?
Which pattern should be used in a drawing app to add new operations (like export formats) to shapes without modifying their classes?
An application must support undo functionality for user actions while keeping object state encapsulated. Which pattern fits best?
Which pattern would you use to coordinate interactions between UI components (fields, buttons) to reduce their dependencies on each other?
If you want to ensure the structure of an algorithm remains the same across subclasses, but allow certain steps to be overridden, which pattern applies?
What is the primary benefit of using the Iterator pattern with a tree or graph data structure?
Which pattern prevents violating encapsulation when restoring a previous object state?
Match the behavioral pattern to its purpose
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the design pattern to its typical real-world use case
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the pattern to the best reason to refactor existing code
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Match the UML relationship to its description in behavioral patterns
Click an item on the left, then click its match on the right. Click a matched item to unmatch.
Arrange the steps to design a Command-based smart home controller
Drag and drop to reorder, or use the arrows.
Order the process to add a new operation with Visitor to a shape hierarchy
Drag and drop to reorder, or use the arrows.
Order the steps for building a Chain of Responsibility for request processing
Drag and drop to reorder, or use the arrows.