To implement standard patterns of object creation
1. In the Builder pattern, what is the purpose of the Builder class?
2. Suppose you are working on a project that requires a class to represent a configuration manager, which is responsible for reading and writing configuration data used by the application. You need to ensure that only one instance of the configuration manager can exist at any given time. Which of the following statements about using the Singleton design pattern to implement the configuration manager class is true?
3. Which design pattern is being used to create the Customer and OfficeExecutive classes based on the attributes provided by the PersonFactory?
4. In a graphics editor, you have different shapes (like circles, squares, etc.) and wish to apply different effects (such as color or shadow) on top of these shapes dynamically. Which design pattern is best suited here?
5. You have implemented the Iterator pattern for your BookShelf class, creating a BookShelfIterator. Now, you realize that for certain functionalities, you need to traverse the books in reverse order, and also be able to add or remove books during iteration. Which type of Iterator would be most suitable to extend or implement to support these additional functionalities (bidirectional traversal and modification during iteration)?