WorksheetsMidterm Examination 1.1 (Software Design)
Total questions: 15
Worksheet time: 8mins
What are Design Patterns?
B. A reusable solution to a commonly occurring problem in software design
A. A finished design that can be transformed directly into code
C. A description/template for solving a problem that can be used in many different situations
D. A method for modifying a family of algorithms
What do Creational Patterns deal with?
B. Object creation mechanisms
A. Object deletion mechanisms
C. Object modification mechanisms
D. Object duplication mechanisms
What does the Factory Method design pattern do?
A. Deletes objects without exposing the instantiation logic to the client
B. Creates objects without exposing the instantiation logic to the client
C. Modifies objects without exposing the instantiation logic to the client
D. Duplicates objects without exposing the instantiation logic to the client
What does the Prototype design pattern allow you to do?
A. Delete an existing object to make additional copies
B. Create new things based on existing structures
D. Duplicate an existing object without creating copies
C. Modify an existing object without creating copies
What does the Singleton design pattern ensure?
D. Objects are created with global access
B. Only one instance of a class is created
A. Multiple instances of a class are created
C. Objects are created without control
What do Structural Patterns emphasize on?
A. Creating an accurate and efficient software system
B. Deleting connections between classes and objects
C. Modifying the code structure
D. Assisting in the development of components
What does the Adapter/Bridge design pattern do?
D. Composes objects into tree structures
C. Converts the interface of one class into another interface
B. Allows incompatible objects to collaborate
A. Allows compatible objects to collaborate
What does the Composite design pattern allow you to do?
A. Compose objects into tree structures
D. Support vast quantities of objects by keeping memory consumption low
B. Make additional functions without disrupting the original class
C. Provide a simplified interface to a larger body of code
What does the Observer design pattern establish?
D. A way to centralize communication between multiple objects
C. A method for modifying a family of algorithms
B. A way to pass requests along a chain of handlers
A. A means for objects to observe and react to changes in other objects
What does the State design pattern enable an object to do?
D. Provide access to a whole object's components in a sequential manner
C. Customize users with queues, requests, and functions
B. Pass requests along a chain of handlers
A. Change how it behaves when its internal condition changes
What does the Command design pattern allow you to do?
B. Pass requests along a chain of handlers
A. Change how an object behaves when its internal condition changes
D. Provide access to a whole object's components in a sequential manner
C. Customize users with queues, requests, and functions
What does the Memento design pattern allow you to do?
B. Pass requests along a chain of handlers
D. Provide access to a whole object's components in a sequential manner
C. Save and restore an object's previous state
A. Change how an object behaves when its internal condition changes
What does the Strategy design pattern do?
A. Change how an object behaves when its internal condition changes
B. Modify a family of algorithms
C. Save and restore an object's previous state
D. Provide access to a whole object's components in a sequential manner
What does the Template method design pattern do?
A. Change how an object behaves when its internal condition changes
B. Modify a family of algorithms
C. Define the overall algorithm structure in the class
D. Provide access to a whole object's components in a sequential manner
What does the Visitor design pattern allow you to do?
B. Modify a family of algorithms
D. Provide access to a whole object's components in a sequential manner
A. Separate algorithms from the objects on which they operate
C. Save and restore an object's previous state
