Gang of Four Design Patterns

Access: Public Instant Grading

Start FlashCards Download PDF Quiz Series

Get the best College algebra course in your pocket!


Quiz PDF eBook: 
Gang of Four Design Patterns
Download GOF Quiz PDF eBook
69 Pages
2010
English US
Educational Materials



Sample Questions from the Gang of Four Design Patterns Quiz

Question: Given the following scenario: You want to create families of related objects, to be used interchangeably to configure you application. What is the most appropriate GoF pattern to use?

Choices:

Chain of Responsibility

Abstract Factory

Builder

Observer

Question: You want all the clients using class A to use the same instance of class A, what should you do to achieve this goal?

Choices:

mark class A final

mark class A abstract

apply the Singleton pattern to class A

apply the Memento pattern to class A

Question: Which of the following are participants in the GOF abstract factory design pattern ?

Choices:

Factory methods

Factory constructors

Abstract factory

Abstract product

Concrete factory

Question: It is also known as Virtual Constructor and it is used to define an interface for creating an object but letting the subclass decide which class to instantiate, this pattern is :

Choices:

Builder

Abstract Factory

Prototype

Factory Method

Question: What are the consequences of applying the Builder design pattern?

Choices:

it makes the designed product hierarchies exchangeable

it's easier to introduce new product implementation

it separates the prodcut construction from it's representation

the director has fine control over the product creation procedure

Question: What would lead you to apply the builder design pattern?

Choices:

To abstract steps of construction of objects so that different implementations

To apply the same object construction procedure on variety of representations

To translates one interface for a class into a compatible interface

To restrict instantiation of a class to one object

Question: Which of the following are participants in the GOF builder design pattern?

Choices:

Builder interface

Constructor Interface

Director Interface

Concrete Builder class

Concrete constructor class

Question: Which pattern is most appropriate when a decision must be made at the time a class is instantiated?

Choices:

Bridge

Composite

Factory Method

Command

Question: What are the consequences of applying the abstract factory patter?

Choices:

it will be much easier to introduce new family of products

it makes it easier for a certain family of objects to work together

it makes it easier for the client to deal with tree-structured data

it makes the designed product families exchangeable

Question: Which design pattern you would you use to decouple the creation procedure of a complex object from it's concrete instance to be able to apply that procedure on variety of implementations.

Choices:

Factory builder design pattern

Method Builder design pattern

Builder design pattern

Factory method design pattern

Question: When would you use the GOF abstract factory pattern?

Choices:

To design a structure which has a uniform interface for both compositions of objects and individual objects.

To ensure that a certain group of related objects are used together

The client which uses your design is not dependent on how the object are created or connected together

To decouple the creation of objects from their usage

Start FlashCards Download PDF Quiz Series
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.quizover.com/embed/design-patterns-multiple-choice-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>