Software Design Patterns Flashcards
what is a design pattern
a reusable design solution to a recurring design problem in a specific design context
give the standard form of a design pattern (6)
name
structure
intent
motivation
implementation
applicability
what do design patterns allow for
reuse of code and experience
shared vocabulary
what are the three groups of design patterns
behavioural
structural
creational
give two behavioural design patterns
state
strategy
give two structural design patterns
adaptor
composite
give two creational design patterns
factory method
singleton
describe the strategy design pattern
create a set of objects that hold alternate algorithms to solve a problem
describe the composite design pattern
common base class represents both part of object and its containing object
describe the adapter design pattern
create a wrapper that converts incoming request into correct format
useful for legacy code
describe the factory design pattern
create a class whose job is to create objects
describe the singleton design pattern
create a class whose constructor is called differently and calls to create return instances of the same base class