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

Q 1 - Can we create a clone of a singleton object?

A - true

B - false

Answer : A

Explanation

true. It is possible to get a clone of singleton object. Throw exception within the body of clone() method to prevent cloning.

Q 3 - Which of the following pattern builds a complex object using simple objects and using a step by step approach?

A - Builder Pattern

B - Bridge Pattern

C - Adapter Pattern

D - Filter Pattern

Answer : A

Explanation

Builder Pattern builds a complex object using simple objects and using a step by step approach. This builder is independent of other objects.

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 8 - Which of the following pattern is used when we want to locate various services using JNDI lookup?

A - DAO Pattern

B - Front Controller Pattern

C - Intercepting Pattern

D - Service Locator Pattern

Answer : D

Explanation

Service Locator Pattern is used when we want to locate various services using JNDI lookup.

Q 9 - Which type of design patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator?

A - Creational Design Patterns

B - Structural Design Patterns

C - Behavioral Design Pattern

D - J2EE Design Patterns

Answer : A

Explanation

Creational Design Patterns provide a way to create objects while hiding the creation logic, rather than instantiating objects directly using new opreator.

Answer : A

Explanation

Business Object , Transfer Object, Client are the entities of Transfer Object pattern.

design_pattern_questions_answers.htm
Advertisements