Software design patterns Flashcards

1
Q

what are the 3 types of software design patterns

A

Creational patterns, Structural patterns, Behavioural patterns

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

what does the creational design pattern consist of?

A

Abstract Factory: For building related objects

Builder: Building complex objects incrementally

Method: Method in a derived class creates associates

Prototype: cloning new instances from a prototype

Singleton: A singular (sole) instance

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

what does the structural design pattern consist of?

A

Adapter: Translator adapts a server interface for a client

Bridge: Abstraction for binding one of many implementations

Composite: Structure for building recursive aggregations

Decorator: Decorator extends an object transparently

Facade: Simplifies the interface for a subsystem

Flyweight: Many fine-grained objects shared efficiently.

Proxy: One object approximates another.

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

what does the behavioural design pattern consist of?

A

Chain of Responsibility: Request delegated to the responsible service provider

Command: Request or Action is first-class object, hence re-storable

Iterator: Aggregate and access elements sequentially

Interpreter: Language interpreter for a small grammar

Mediator: Coordinates interactions between its associates

Memento: Snapshot captures and restores object states privately

Observer: Dependents update automatically when subject changes

State: Object whose behaviour depends on its state

Strategy: Abstraction for selecting one of many algorithms

Template Method: Algorithm with some steps supplied by a derived class

Visitor: Operations applied to elements of a heterogeneous object structure

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