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

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

A - Composite Pattern

B - Facade Pattern

C - Flyweight Pattern

D - Decorator Pattern

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 pattern a request is wrapped under an object as command and passed to invoker object?

A - Proxy Pattern

B - Chain of Responsibility Pattern

C - Command Pattern

D - Interpreter Pattern

Answer : C

Explanation

A request is wrapped under an object as command and passed to invoker object. Invoker object looks for the appropriate object which can handle this command and passes the command to the corresponding object which executes the command.

Answer : C

Explanation

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

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?

A - Factory Pattern

B - Abstract Factory Pattern

C - Singleton Pattern

D - Transfer Object Pattern

Answer : A

Explanation

Factory Pattern creates object without exposing the creation logic to the client and refer to newly created object using a common interface.

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