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

Explanation

In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software which initiated the concept of Design Pattern in Software development. These authors are collectively known as Gang of Four (GOF).

Answer : C

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 creates a chain of receiver objects for a request?

A - Proxy Pattern

B - Chain of Responsibility Pattern

C - Command Pattern

D - Interpreter Pattern

Answer : B

Explanation

As the name suggests, the chain of responsibility pattern creates a chain of receiver objects for a request.

Q 6 - In which of the following pattern, a class behavior or its algorithm can be changed at run time?

A - State Pattern

B - Null Object Pattern

C - Strategy Pattern

D - Template Pattern

Answer : C

Explanation

In Strategy pattern, a class behavior or its algorithm can be changed at run time.

Q 7 - In which of the following pattern, a visitor class is used which changes the executing algorithm of an element class?

A - Visitor Pattern

B - MVC Pattern

C - Business Delegate Pattern

D - Composite Entity Pattern

Answer : A

Explanation

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

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.

Answer : A

Explanation

Data Access Object Interface, Data Access Object concrete class, Model Object or Value Object are the entities of DAO Pattern.


design_pattern_questions_answers.htm

Advertisements