Design Patterns Online Quiz


Advertisements

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.

Questions and Answers

Q 2 - Event handling frameworks like swing, awt use Observer Pattern.

A - false

B - true

Answer : B

Explanation

true. Event handling frameworks like swing, awt use Observer Pattern.

Q 3 - Which of the following pattern is used when creation of object directly is costly?

A - Bridge Pattern

B - Adapter Pattern

C - Prototype Pattern

D - Filter Pattern

Answer : A

Explanation

Prototype pattern is used when creation of object directly is costly.

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 restore state of an object to a previous state?

A - Iterator Pattern

B - Mediator Pattern

C - Memento Pattern

D - Observer Pattern

Answer : C

Explanation

Memento pattern is used to restore state of an object to a previous state.

Answer : C

Explanation

Business Delegate pattern is used to decouple presentation tier and business tier.

Q 8 - In which of the following pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes?

A - Factory Pattern

B - Abstract Factory Pattern

C - Singleton Pattern

D - Transfer Object Pattern

Answer : B

Explanation

In Abstract Factory Pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes.

Answer : C

Explanation

Composite Entity, Coarse-Grained Object, Dependent Object, Strategies are the entities of Composite Entity Pattern.

design_pattern_questions_answers.htm
Advertisements