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 Abstract Factory design pattern.
Abstract Factory patterns work around a super-factory which creates other factories. This factory is also called as factory of factories. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Abstract Factory pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes. Each generated factory can give the objects as per the Factory pattern.
Q 2 - Which of the following describes the Builder pattern correctly?
Builder pattern builds a complex object using simple objects and using a step by step approach. This builder is independent of other objects.
Q 3 - Which of the following describes the Composite pattern correctly?
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?
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 describes the State pattern correctly?
In State pattern, a class behavior changes based on its state.
Q 6 - Which of the following describes the Template pattern correctly?
In Template pattern, an abstract class exposes defined way(s)/template(s) to execute its methods.
Q 7 - Which of the following pattern is used in EJB persistence mechanism?
Composite Entity pattern is used in EJB persistence mechanism.
Q 8 - Which of the following pattern creates object without exposing the creation logic to the client and refer to newly created object using a common interface?
Factory Pattern creates object without exposing the creation logic to the client and refer to newly created object using a common interface.
Q 9 - Which of the following describes the Behavioral pattern correctly?
Behavioral Design Patterns are specifically concerned with communication between objects.
Q 10 - Which of the following is the correct list of entities of Intercepting pattern?
Filter, Filter Chain, Target, Filter Manager, Client are the entities of Intercepting pattern.