Creational Design Patterns
- Design Patterns - Factory Pattern
- Abstract Factory Pattern
- Design Patterns - Singleton Pattern
- Design Patterns - Builder Pattern
- Design Patterns - Prototype Pattern
Structural Design Patterns
- Design Patterns - Adapter Pattern
- Design Patterns - Bridge Pattern
- Design Patterns - Filter Pattern
- Design Patterns - Composite Pattern
- Design Patterns - Decorator Pattern
- Design Patterns - Facade Pattern
- Design Patterns - Flyweight Pattern
- Design Patterns - Proxy Pattern
- Chain of Responsibility Pattern
Behavioral Design Patterns
- Design Patterns - Command Pattern
- Design Patterns - Interpreter Pattern
- Design Patterns - Iterator Pattern
- Design Patterns - Mediator Pattern
- Design Patterns - Memento Pattern
- Design Patterns - Observer Pattern
- Design Patterns - State Pattern
- Design Patterns - Strategy Pattern
- Design Patterns - Template Pattern
- Design Patterns - Visitor Pattern
J2EE Design Patterns
- Design Patterns - Null Object Pattern
- Design Patterns - MVC Pattern
- Business Delegate Pattern
- Composite Entity Pattern
- Data Access Object Pattern
- Front Controller Pattern
- Intercepting Filter Pattern
- Service Locator Pattern
- Transfer Object Pattern
Design Patterns Useful Resources
Design Patterns Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Design Patterns Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is correct list of classifications of design patterns.
A - Creational, Structural and Behavioral patterns.
B - Executional, Structural and Behavioral patterns.
Answer : A
Explanation
Design patterns can be classified in three categories: Creational, Structural and Behavioral patterns.
Answer : B
Explanation
true. Integer.valueOf() returns a Integer instance representing the specified int value.
Q 3 - Which of the following describes the Composite pattern correctly?
A - This pattern builds a complex object using simple objects and using a step by step approach.
Answer : B
Explanation
Composite pattern is used where we need to treat a group of objects in similar way as a single object.
Q 4 - Which of the following pattern creates a chain of receiver objects for a request?
Answer : B
Explanation
As the name suggests, the chain of responsibility pattern creates a chain of receiver objects for a request.
Q 5 - Which of the following describes the Memento pattern correctly?
B - This pattern is used to reduce communication complexity between multiple objects or classes.
C - This pattern is used to restore state of an object to a previous state.
Answer : C
Explanation
This pattern is used to restore state of an object to a previous state.
Q 6 - Which of the following describes the Template pattern correctly?
A - In this pattern, a class behavior changes based on its state.
B - In this pattern, a null object replaces check of NULL object instance.
C - In this pattern, a class behavior or its algorithm can be changed at run time.
D - In this pattern, an abstract class exposes defined way(s)/template(s) to execute its methods.
Answer : D
Explanation
In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods.
Q 7 - Which of the following describes the Intercepting pattern correctly?
D - This pattern is used when we want to locate various services using JNDI lookup.
Answer : C
Explanation
Intercepting pattern, is used when we want to do some pre-processing / post-processing with request or response of the application.
Q 8 - Which of the following describes the Transfer Object pattern correctly?
Answer : D
Explanation
Transfer Object is used when we want to pass data with multiple attributes in one shot from client to server.
Q 9 - Which type of design patterns are specifically concerned with communication between objects?
A - Creational Design Patterns
Answer : C
Explanation
Behavioral Design Patterns are specifically concerned with communication between objects.
Q 10 - Which of the following is the correct list of entities of Front Controller pattern?
A - Front Controller, Dispatcher, View
B - Front Controller, Dispatcher
Answer : A
Explanation
Front Controller, Dispatcher, View are the entities of Front Controller pattern.