Design Patterns Mock Test



This section presents you various set of Mock Tests related to Design Patterns Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

Design Patterns Mock Test IV

Q 3 - 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 4 - 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 5 - 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.

Q 6 - 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 7 - 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 8 - 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.

Q 9 - Which type of design patterns concern class and object composition?

A - Creational Design Patterns

B - Structural Design Patterns

C - Behavioral Design Pattern

D - J2EE Design Patterns

Answer : B

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 10 - 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 11 - Which type of design patterns are specifically concerned with the presentation tier?

A - Creational Design Patterns

B - Structural Design Patterns

C - Behavioral Design Pattern

D - J2EE Design Patterns

Answer : D

Explanation

J2EE Design Patterns are specifically concerned with the presentation tier.

Q 16 - Which of the following is the correct list of entities of MVC pattern?

A - Model, View, Controller

B - Model, Viewer, Control

C - Middle, Viewer, Controller

D - Model, View, Control

Answer : A

Explanation

Model, View, Controller are the entities of MVC Pattern.

Answer : B

Explanation

Client, Business Delegate, LookUp Service, Business Service are the entities of Business Delegate Pattern.

Answer : C

Explanation

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

Answer : A

Explanation

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

Q 20 - Which of the following is the correct list of entities of Front Controller pattern?

A - Front Controller, Dispatcher, View

B - Front Controller, Dispatcher

C - Controller, Dispatcher, View

D - Front Controller, View

Answer : A

Explanation

Front Controller, Dispatcher, View are the entities of Front Controller pattern.

Answer : C

Explanation

Filter, Filter Chain, Target, Filter Manager, Client are the entities of Intercepting pattern.

Answer : B

Explanation

Service, Context, Service Locator, Cache, Client are the entities of Service Locator pattern.

Answer : A

Explanation

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

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

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

Answer Sheet

Question Number Answer Key
1 C
2 D
3 A
4 B
5 C
6 D
7 D
8 A
9 B
10 C
11 D
12 A
13 B
14 C
15 D
16 A
17 B
18 C
19 A
20 A
21 C
22 B
23 A
24 A
25 B
design_pattern_questions_answers.htm
Advertisements