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

Answer : C

Explanation

Structural design patterns concern class and object composition. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities.

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.

Q 8 - Which of the following pattern involves a single class which is responsible to create an object while making sure that only single object gets created?

A - Factory Pattern

B - Abstract Factory Pattern

C - Singleton Pattern

D - Transfer Object Pattern

Answer : C

Explanation

Singleton Pattern involves a single class which is responsible to create an object while making sure that only single object gets created.

Q 9 - Which type of design patterns are specifically concerned with communication between objects?

A - Creational Design Patterns

B - Structural Design Patterns

C - Behavioral Design Pattern

D - J2EE Design Patterns

Answer : C

Explanation

Behavioral Design Patterns are specifically concerned with communication between objects.

Q 10 - Which of the following is the correct list of entities of Front Controller pattern?

A - Front Controller, Dispatcher, View

B - Front Controller, Dispatcher

C - Controller, Dispatcher, View

D - Front Controller, View

Answer : A

Explanation

Front Controller, Dispatcher, View are the entities of Front Controller pattern.


design_pattern_questions_answers.htm

Advertisements