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

Explanation

Design patterns represent the best practices used by experienced object-oriented software developers. Design patterns are solutions to general problems that software developers faced during software development. These solutions were obtained by trial and error by numerous software developers over quite a substantial period of time.

Q 3 - Which of the following pattern works as a bridge between two incompatible interfaces?

A - Builder Pattern

B - Adapter Pattern

C - Prototype Pattern

D - Filter Pattern

Answer : B

Explanation

Adapter pattern works as a bridge between two incompatible interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces.

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 is used when there is one-to-many relationship between objects such as if one object is modified, its depenedent objects are to be notified automatically?

A - Iterator Pattern

B - Mediator Pattern

C - Memento Pattern

D - Observer Pattern

Answer : A

Explanation

Observer Pattern is used when there is one-to-many relationship between objects such as if one object is modified, its depenedent objects are to be notified automatically.

Answer : A

Explanation

In Visitor pattern, a visitor class is used which changes the executing algorithm of an element class.

Q 9 - Which of the following pattern is used when we want to pass data with multiple attributes in one shot from client to server?

A - Factory Pattern

B - Abstract Factory Pattern

C - Singleton Pattern

D - Transfer Object Pattern

Answer : D

Explanation

Transfer Object Pattern is used when we want to pass data with multiple attributes in one shot from client to server.

Answer : C

Explanation

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

design_pattern_questions_answers.htm
Advertisements