To implement standard patterns of object creation
1. What is the main purpose of Creational Design Patterns?
2. Which of the following is a need for using the Factory pattern?
3. What is the purpose of the Singleton design pattern?
4. You are developing a system for an online coffee shop. Customers can order a basic coffee, and then add various condiments like milk, sugar, whipped cream, or chocolate syrup. Each condiment adds to the cost and modifies the description of the coffee. You want to design this system such that adding new condiments is easy and doesn't require modifying existing coffee classes. Which design pattern is most suitable for implementing the condiment addition functionality, allowing for flexible and dynamic addition of features (condiments) to a core object (coffee) without altering its structure?
5. Which of the following does not describe the Iterator Pattern?