- 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 - What is Gang of Four (GOF)?
B - Gang of Four (GOF) is a name of a book on Design Patterns.
Answer : A
Explanation
In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development. These authors are collectively known as Gang of Four (GOF).
Q 2 - Which of the following describes the Adapter pattern correctly?
A - This pattern builds a complex object using simple objects and using a step by step approach.
B - This pattern refers to creating duplicate object while keeping performance in mind.
C - This pattern works as a bridge between two incompatible interfaces.
Answer : C
Explanation
Adapter pattern works as a bridge between two incompatible interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces.
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 pattern allows a user to add new functionality to an existing object without altering its structure?
Answer : D
Explanation
Decorator Pattern allows a user to add new functionality to an existing object without altering its structure.
Q 5 - Which of the following pattern is used when there is one-to-many relationship between objects such as if one object is modified, its depenedent objects are to be notified automatically?
Answer : A
Explanation
Observer Pattern is used when there is one-to-many relationship between objects such as if one object is modified, its depenedent objects are to be notified automatically.
Q 6 - Which of the following describes the Visitor pattern correctly?
B - This pattern is used to separate application's concerns.
C - This pattern is used to decouple presentation tier and business tier.
Answer : A
Explanation
In Visitor pattern, a visitor class is used which changes the executing algorithm of an element class.
Q 7 - Which of the following describes the Front Controller pattern correctly?
D - This pattern is used when we want to locate various services using JNDI lookup.
Answer : B
Explanation
Front Controller pattern, is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler.
Q 8 - Which of the following pattern is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler?
Answer : B
Explanation
Front Controller Pattern is used to provide a centralized request handling mechanism so that all requests will be handled by a single handler.
Q 9 - Which of the following describes the J2EE pattern correctly?
C - This type of pattern are specifically concerned with communication between objects.
D - This type of pattern are specifically concerned with the presentation tier.
Answer : D
Explanation
J2EE Design Patterns are specifically concerned with the presentation tier.
Q 10 - Which of the following is the correct list of entities of Intercepting pattern?
A - Filter, Filter Chain, Target, Client
B - Filter, Target, Filter Manager, Client
Answer : C
Explanation
Filter, Filter Chain, Target, Filter Manager, Client are the entities of Intercepting pattern.
To Continue Learning Please Login
Login with Google