define a design pattern.
pattern is a general repeatable solution to commonly occurring problem in OO software design [ context ].
is a design pattern a finished design? why?
the book; The Gang of Four’s book was written based on the principles of _____________ ?
Christopher Alexander
what did the GoF’s book achieve?
initiated the concept of design patterns in software dev’t
according to the GoF, a design pattern should be based on which OO principles?
what are types of DP defined by the GoF?
describe creational dp
describe a structural dp?
describe behavioral dp
a factory method is a pattern catalog belonging to ____________ dp?
creational
an adapter is a pattern catalog belonging to ____________ dp?
structural
what are characteristics of a dp?
LV R
- levels - decomposition of patterns
- view points - description of patterns
- roles - “players” in pattern usage
what is the d/ce b/n static and dynamic viewpoints?
what are the forms of a dp?
FDR
- delegation
- recursion
describe delegation dp form.
describe recursion dp?
what are the goals of a dp?
GRE
- reuse of designs
- evolution of sw
how can we achieve the goals of a dp?
by reducing dependencies among components
- program to interfaces not implementations
- favor obj composition not inheritance
- use delegation
what are elements of a dp?
NPC are Sus
- name
- problem
- consequence
- solution
____________ is an element of a dp, that describes when to apply a pattern?
problem
____________ is an element of a dp, that describes elements that make up the pattern, their r/n ship and responsibilities?
solution
____________ is an element of a dp, that describes results and the tradeoffs of applying the pattern?
consequence
explain what scope is in a dp
what scope of dp deals with class inheritance?
class pattern