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 is used when we need to decouple an abstraction from its implementation so that the two can vary independently?

A - Bridge Pattern

B - Adapter Pattern

C - Prototype Pattern

D - Filter Pattern

Answer : A

Explanation

Bridge pattern is used when we need to decouple an abstraction from its implementation so that the two can vary independently.

Answer : D

Explanation

Command pattern is a data driven design pattern and falls under behavioral pattern category. 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.

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

Q 10 - In MVC pattern, Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.

A - true

B - false

Answer : A

Explanation

True. In MVC pattern, Model represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.


design_pattern_questions_answers.htm

Advertisements