You are on page 1of 5

Design Pattern

1 of 5

https://docs.google.com/a/ritrjpm.ac.in/forms/d/1LFKHEQyVa0HV...

1. Which design pattern you would you use to limit the class instantiation to one object?
Mark only one oval.
Factory Method Design Pattern
Builder design pattern
Prototype design pattern
Singleton design pattern
2. Register Number

3. Which design pattern is used to design seperate classes for varying, but related,
algorithms or policies?
Mark only one oval.
Bridge
Adapter
Controller
Strategy
4. Which of the following pattern is used when we need to decouple an abstraction from
its implementation so that the two can vary independently?
Mark only one oval.
Bridge Pattern
Observer Pattern
Controller Pattern
Creator Pattern
5. Which one of the following is not a GoF design pattern types?
Mark only one oval.
creational
behavioral
structural
functional

19-08-2015 09:42

Design Pattern

2 of 5

https://docs.google.com/a/ritrjpm.ac.in/forms/d/1LFKHEQyVa0HV...

6. Which of the following represents The (static) structure and (dynamic) behavior of the
pattern?
Mark only one oval.
Name
Application
Consequences
Form
7. Which pattern is used to assign responsibilities to appropriate classes?
Mark only one oval.
Information Expert
Controller
Cohesion
Coupling
8. Which design pattern is used in the Java Database connectivity JDBC(TM)?
Mark only one oval.
Builder design pattern
Factory method design pattern
Abstract Factory design Pattern
Singleton Design pattern
9. You design an application for an advertis-ement company, which produces different
sort of publications such as books, articles, leaflets, etc. The company publishes those
products in many media formats such as printed material, CD, DVD, online websites,
etc. How you would model the company products hierarchy (Publications, Media)?
Mark only one oval.
Use composite design pattern to enable the publication and media hierarchies to be
treated in the same way as a single instance of an object.
Use the adapter design pattern to translates publication interface into a compatible
media interface.
Use bridge design pattern to build separate hierarchies for the publications and the
media, to decouple the abstraction from its implementation so that the two can vary
independently
10. Why are Patterns important?
Mark only one oval.
They capture expert design knowledge
They make captured design accessible to both novices and other experts
All of the mentioned

19-08-2015 09:42

Design Pattern

3 of 5

https://docs.google.com/a/ritrjpm.ac.in/forms/d/1LFKHEQyVa0HV...

11. You are trying to add a class already written in another application to serve clients,
beside other classes, in your system. All other classes have the same interface, the
incoming class has a totally different interface than the clients expect, but contains all
required functionalities. What kind of refactoring is needed to make this class fit in with
minimum changes in your system?
Mark only one oval.
apply the Proxy Pattern
apply the Adapter Pattern
create a new class which implements the expected interface and copy and paste the
code from the class in the other application to this new class
12. In MVC pattern, View represents the visualization of the data that model contains.
Mark only one oval.
True
False
13. Which pattern is used to resolve incompatible interfaces, or provide a stable interface
to similar components with different interfaces?
Mark only one oval.
Factory
Adapter
Singleton
Controller
14. Which of the following is correct about Structural design patterns?
Mark only one oval.
These design patterns are specifically concerned with communication between
objects.
These design patterns provide a way to create objects while hiding the creation logic,
rather than instantiating objects directly using new operator.
These 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
15. Which GOF design pattern is applied in the code snippet below? public class
PrintSpooler { private static final PrintSpooler INSTANCE = new PrintSpooler(); private
PrintSpooler() {} public static PrintSpooler getInstance() { return INSTANCE; } }
Mark only one oval.
PrintSpooler design pattern
Factory design pattern
Singleton design pattern

19-08-2015 09:42

Design Pattern

4 of 5

https://docs.google.com/a/ritrjpm.ac.in/forms/d/1LFKHEQyVa0HV...

16. Which pattern is used to Decouple an abstraction from its implementation so that the
two can vary independently?
Mark only one oval.
Bridge
Adapter
Information Expert
Strategy
17. A pattern that is intended to provide a means to define a family of algorithms and
encapsulate each one as an object for interchangeable use:
Mark only one oval.
Strategy Pattern
Abstract Factory Pattern
Visitor Pattern
State Pattern
18. Use bridge design pattern to build separate hierarchies for the publications and the
media, to decouple the abstraction from its implementation so that the two can vary
independently
Mark only one oval.
Bridge
Composite
Factory Method
Command
19. Expansion of GRASP
Mark only one oval.
General Responsibility Assignment Software Pattern
General Responsibility Assignment Service Pattern
Generic Responsibility Assignment Software Pattern
General Responsibility Application Software Pattern
20. Who should be responsible for creating a new instance of some class?
Mark only one oval.
Creator
Information Expert
Cohesion
Coupling

19-08-2015 09:42

Design Pattern

5 of 5

https://docs.google.com/a/ritrjpm.ac.in/forms/d/1LFKHEQyVa0HV...

21. In the Publish-Subscribe messaging model, the subscribers register themselves in a


topic and are notified when new messages arrive to the topic. Which pattern does most
describe this model?
Mark only one oval.
Adapter
Notifier
State
Observer

Powered by

19-08-2015 09:42

You might also like