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.

Questions and Answers

Answer : D

Explanation

Singleton pattern is one of the simplest design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.This pattern involves a single class which is responsible to create an object while making sure that only single object gets created. This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.

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 : A

Explanation

In proxy pattern, a class represents functionality of another class. This type of design pattern comes under structural pattern. In proxy pattern, we create object having original object to interface its functionality to outer world.

Q 8 - Which of the following pattern is used when we want to do some pre-processing / post-processing with request or response of the application?

A - DAO Pattern

B - Front Controller Pattern

C - Intercepting Pattern

D - Service Locator Pattern

Answer : C

Explanation

Intercepting Pattern is used when we want to do some pre-processing / post-processing with request or response of the application.

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 MVC pattern?

A - Model, View, Controller

B - Model, Viewer, Control

C - Middle, Viewer, Controller

D - Model, View, Control

Answer : A

Explanation

Model, View, Controller are the entities of MVC Pattern.

design_pattern_questions_answers.htm
Advertisements