Software Design Patterns

Review your understanding of common design patterns like Singleton,Factory,and Observer.

1. Which design pattern ensures a class has only one instance and provides a global point of access to it?
2. Which of the following are behavioral design patterns? (Select all that apply)
3. The Factory pattern is classified as a structural design pattern.
4. What design pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable? (one word)
5. Which pattern separates the construction of a complex object from its representation, allowing the same construction process to create different representations?
6. Which of the following patterns promote loose coupling between objects? (Select all that apply)
7. The Decorator pattern allows adding new functionality to an existing object without altering its structure.
8. What pattern provides a unified interface to a set of interfaces in a subsystem, simplifying its use? (one word)
9. Which pattern is used to create a duplicate of an existing object efficiently by copying its properties?
10. Which of the following are creational design patterns? (Select all that apply)
11. The Command pattern encapsulates a request as an object, allowing for parameterization of clients with different requests.
12. What pattern passes a request along a chain of handlers, where each handler decides to process the request or pass it to the next handler? (two words)
13. Which pattern defines the skeleton of an algorithm in a method, deferring some steps to subclasses?
14. Which structural patterns use object composition to combine objects into larger structures? (Select all that apply)
15. The Observer pattern establishes a one-to-many dependency between objects.
16. What creational pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes? (two words)
17. Which pattern lets you define a new operation without changing the classes of the elements on which it operates?
18. Which behavioral patterns manage communication between objects? (Select all that apply)
19. The Prototype pattern is used to create new objects by cloning an existing object.
20. What pattern dynamically changes an object's behavior when its internal state changes? (one word)
Answered 0 of 0 — 0 correct