Design Patterns Flashcards

You may prefer our related Brainscape-certified 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
Q

Constructs complex objects by separating construction and representation.

A

Builder

26
Q

Creates objects without specifying the exact class to create.

A

Factory Method

27
Q

Creates objects by cloning an existing object.

A

Prototype

28
Q

Restricts object creation for a class to only one instance.

A

Singleton

29
Q

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

A

Adapter

30
Q

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

A

Bridge

31
Q

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

A

Composite

32
Q

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

A

Decorator

33
Q

Provides a simplified interface to a large body of code.

A

Facade

34
Q

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

A

Flyweight

35
Q

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

A

Proxy

36
Q

Delegates commands to a chain of processing objects.

A

Chain of Responsibility

37
Q

Creates objects which encapsulate actions and parameters.

A

Command

38
Q

Implements a specialized language.

A

Interpreter

39
Q

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

A

Iterator.

40
Q

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

A

Mediator

41
Q

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

A

Memento

42
Q

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

A

Observer

43
Q

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

A

State

44
Q

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

A

Strategy

45
Q

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

A

Template Method

46
Q

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

A

Visitor