Design Patterns Flashcards

1
Q

Abstract Factory

A

Groups object factories that have a common theme.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Builder

A

Constructs complex objects by separating construction and representation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Factory Method

A

Creates objects without specifying the exact class to create.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Prototype

A

Creates objects by cloning an existing object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Singleton

A

Restricts object creation for a class to only one instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Adapter

A

Allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bridge

A

Decouples an abstraction from its implementation so that the two can vary independently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Composite

A

Composes zero-or-more similar objects so that they can be manipulated as one object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Decorator

A

Dynamically adds/overrides behavior in an existing method of an object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Facade

A

Provides a simplified interface to a large body of code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Flyweight

A

Reduces the cost of creating and manipulating a large number of similar objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Proxy

A

Provides a placeholder for another object to control access, reduce cost, and reduce complexity.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Chain of Responsibility

A

Delegates commands to a chain of processing objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Command

A

Creates objects which encapsulate actions and parameters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Interpreter

A

Implements a specialized language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Iterator.

A

Accesses the elements of an object sequentially without exposing its underlying representation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Mediator

A

Allows for loose coupling between classes by being the only class that has detailed knowledge of their methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Memento

A

Provides the ability to restore an object to its previous state (undo).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Observer

A

is a publish/subscribe pattern which allows a number of observer objects to see an event.

20
Q

State

A

Allows an object to alter its behavior when its internal state changes.

21
Q

Strategy

A

Allows one of a family of algorithms to be selected on-the-fly at runtime.

22
Q

Template Method

A

Defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior.

23
Q

Visitor

A

Separates an algorithm from an object structure by moving the hierarchy of methods into one object.

24
Q

Groups object factories that have a common theme.

A

Abstract Factory

25
Constructs complex objects by separating construction and representation.
Builder
26
Creates objects without specifying the exact class to create.
Factory Method
27
Creates objects by cloning an existing object.
Prototype
28
Restricts object creation for a class to only one instance.
Singleton
29
Allows classes with incompatible interfaces to work together by wrapping its own interface around that of an already existing class.
Adapter
30
Decouples an abstraction from its implementation so that the two can vary independently.
Bridge
31
Composes zero-or-more similar objects so that they can be manipulated as one object.
Composite
32
Dynamically adds/overrides behavior in an existing method of an object.
Decorator
33
Provides a simplified interface to a large body of code.
Facade
34
Reduces the cost of creating and manipulating a large number of similar objects.
Flyweight
35
Provides a placeholder for another object to control access, reduce cost, and reduce complexity.
Proxy
36
Delegates commands to a chain of processing objects.
Chain of Responsibility
37
Creates objects which encapsulate actions and parameters.
Command
38
Implements a specialized language.
Interpreter
39
Accesses the elements of an object sequentially without exposing its underlying representation.
Iterator.
40
Allows for loose coupling between classes by being the only class that has detailed knowledge of their methods.
Mediator
41
Provides the ability to restore an object to its previous state (undo).
Memento
42
is a publish/subscribe pattern which allows a number of observer objects to see an event.
Observer
43
Allows an object to alter its behavior when its internal state changes.
State
44
Allows one of a family of algorithms to be selected on-the-fly at runtime.
Strategy
45
Defines the skeleton of an algorithm as an abstract class, allowing its subclasses to provide concrete behavior.
Template Method
46
Separates an algorithm from an object structure by moving the hierarchy of methods into one object.
Visitor