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

Explanation

Structural design patterns concern class and object composition. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionalities.

Q 2 - Integer class is an example of Decorator pattern.

A - true

B - false

Answer : A

Explanation

true. Wrapper classes like Integer, Boolean uses Decorator pattern.

Q 4 - Which of the following pattern provides a way to evaluate language grammar or expression?

A - Proxy Pattern

B - Chain of Responsibility Pattern

C - Command Pattern

D - Interpreter Pattern

Answer : D

Explanation

Interpreter pattern provides a way to evaluate language grammar or expression.

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 8 - In which of the following pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes?

A - Factory Pattern

B - Abstract Factory Pattern

C - Singleton Pattern

D - Transfer Object Pattern

Answer : B

Explanation

In Abstract Factory Pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes.

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 - In MVC pattern, View represents the visualization of the data that model contains.

A - false

B - true

Answer : B

Explanation

True. In MVC pattern, View represents the visualization of the data that model contains.


design_pattern_questions_answers.htm

Advertisements