- Design Patterns Tutorial
- Design Patterns - Home
- Design Patterns - Overview
- Design Patterns - Factory Pattern
- Abstract Factory Pattern
- Design Patterns - Singleton Pattern
- Design Patterns - Builder Pattern
- Design Patterns - Prototype Pattern
- 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
- 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 - Null Object Pattern
- Design Patterns - Strategy Pattern
- Design Patterns - Template Pattern
- Design Patterns - Visitor 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 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 about Creational design patterns.
A - These design patterns are specifically concerned with communication between objects.
Answer : B
Explanation
Creational design patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator.
Answer : B
Explanation
true. Integer.valueOf() returns a Integer instance representing the specified int value.
Q 3 - Which of the following pattern is used where we need to treat a group of objects in similar way as a single object?
Answer : A
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 describes the Interpreter pattern correctly?
A - In this pattern a class represents functionality of another class.
B - This pattern creates a chain of receiver objects for a request.
C - This pattern provides a way to evaluate language grammar or expression.
D - In this pattern a request is wrapped under an object as command and passed to invoker object.
Answer : C
Explanation
Interpreter pattern provides a way to evaluate language grammar or expression. This type of pattern comes under behavioral pattern. This pattern involves implementing an expression interface which tells to interpret a particular context.
Q 5 - Which of the following pattern is used to get a way to access the elements of a collection object in sequential manner without any need to know its underlying representation?
Answer : A
Explanation
Iterator pattern is used to get a way to access the elements of a collection object in sequential manner without any need to know its underlying representation.
Q 6 - In which of the following pattern, a null object replaces check of NULL object instance?
Answer : B
Explanation
In Null Object pattern, a null object replaces check of NULL object instance.
Q 7 - Which of the following pattern is used to separate low level data accessing API or operations from high level business services?
Answer : A
Explanation
DAO Pattern is used to separate low level data accessing API or operations from high level business services.
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 of the following pattern is used when we want to pass data with multiple attributes in one shot from client to server?
Answer : D
Explanation
Transfer Object Pattern is used when we want to pass data with multiple attributes in one shot from client to server.
Q 10 - Which of the following is the correct list of entities of DAO pattern?
A - Data Access Object Interface, Data Access Object concrete class, Model Object or Value Object
B - Data Access Object Interface, Model Object or Value Object
C - Data Access Object Interface, Data Access Object concrete class
D - Data Access Object concrete class, Model Object or Value Object
Answer : A
Explanation
Data Access Object Interface, Data Access Object concrete class, Model Object or Value Object are the entities of DAO Pattern.
To Continue Learning Please Login
Login with Google