
- 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 Resources
- Design Patterns - Questions/Answers
- Design Patterns - Quick Guide
- Design Patterns - Useful Resources
- Design Patterns - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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.

Answer : A
Explanation
true. It is possible to get a clone of singleton object. Throw exception within the body of clone() method to prevent cloning.
Q 2 - Which of the following describes the Filter 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.
Answer : B
Explanation
Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects using different criteria and chaining them in a decoupled way through logical operations.
Q 3 - Which of the following pattern builds a complex object using simple objects and using a step by step approach?
Answer : A
Explanation
Builder Pattern builds a complex object using simple objects and using a step by step approach. This builder is independent of other objects.
Q 4 - Which of the following pattern hides the complexities of the system and provides an interface to the client using which the client can access the system?
Answer : B
Explanation
Facade pattern hides the complexities of the system and provides an interface to the client using which the client can access the system.
Q 5 - Which of the following describes the Observer 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 : D
Explanation
This 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 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 Service Locator pattern correctly?
D - This pattern is used when we want to locate various services using JNDI lookup.
Answer : D
Explanation
Service Locator pattern, is used when we want to locate various services using JNDI lookup.
Q 8 - Which of the following pattern is used when we want to locate various services using JNDI lookup?
Answer : D
Explanation
Service Locator Pattern is used when we want to locate various services using JNDI lookup.
Q 9 - Which type of design patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator?
A - Creational Design Patterns
Answer : A
Explanation
Creational Design Patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator.
Q 10 - Which of the following is the correct list of entities of Transfer Object pattern?
A - Business Object , Transfer Object, Client
Answer : A
Explanation
Business Object , Transfer Object, Client are the entities of Transfer Object pattern.