Term
what's purpose of object design? |
|
Definition
prepare for implementation |
|
|
Term
what are 4 activities in object design? |
|
Definition
1. reuse 2. interface specification 3. object model restructuring 4. object model optimization |
|
|
Term
what's goal of design pattern? |
|
Definition
to ensure the system model stays simple |
|
|
Term
what are 3 types of design patterns? |
|
Definition
structural patter, behavioral pattern, creational pattern |
|
|
Term
usually what does structural pattern do? |
|
Definition
1. reduce coupling 2. introduce abstract class 3. encapsulate complex structure |
|
|
Term
usually what does behavioral pattern do? |
|
Definition
1. choice of algorithms 2. characterize complex control flows |
|
|
Term
usually what does creation pattern do? |
|
Definition
1. abstraction of complex instantiation process 2. make system independent from the way its objects are created |
|
|
Term
|
Definition
1. connects incompatible components 2. allow access to new system while maintaining existing interface 3. uses inheritance and delegation |
|
|
Term
what is another name for adapter pattern? |
|
Definition
|
|
Term
what type of pattern is adapter pattern? |
|
Definition
|
|
Term
give an example where adapter pattern might be used |
|
Definition
there is a system, i don't want to rebuild the interface, so i use adapter pattern |
|
|
Term
describe composite pattern |
|
Definition
1. tree structure 2. lets client treat individual objects and composition uniformly |
|
|
Term
what type of pattern is composite pattern? |
|
Definition
|
|
Term
when is composite pattern useful? |
|
Definition
|
|
Term
describe abstract factory pattern |
|
Definition
create objects that are portable to many platforms |
|
|
Term
what type of pattern is abstract factory pattern? |
|
Definition
|
|
Term
|
Definition
1. can provide multiple implementations under same interface 2. can interface to a component that's incomplete 3. decouple abstraction from implementation so two can vary independently |
|
|
Term
what type of pattern is bridge pattern? |
|
Definition
|
|
Term
what are similarities of adapter and bridge |
|
Definition
hide details of underlying implementation |
|
|
Term
what are differences of adapter and bridge? |
|
Definition
adapter makes thing work after designed bridge makes it work before designed |
|
|
Term
|
Definition
1. provide unified interface 2. like dispatcher |
|
|
Term
what kind of pattern is facade pattern? |
|
Definition
|
|
Term
what's an application of bridge pattern? |
|
Definition
|
|
Term
describe strategy pattern |
|
Definition
1. different algorithms 2. can add more algorithms later 3. can switch which algorithm to use at run time |
|
|
Term
what type of pattern is strategy pattern? |
|
Definition
|
|
Term
what's usage of policy in strategy pattern? |
|
Definition
used as helper to know which algo to select |
|
|
Term
|
Definition
1. encapsulates control flow 2. |
|
|
Term
describe observer pattern |
|
Definition
1. wanna update some other people 2. want extensible and scalable |
|
|
Term
what type of pattern is observer pattern? |
|
Definition
|
|
Term
|
Definition
1. provide placeholder for another object to access to it because accessing real object might be too heavy 2. location transparent 3. control access rights |
|
|
Term
what type of pattern is proxy pattern? |
|
Definition
|
|