Chapter 5 - Design & Implementation Flashcards
1
Q
What are CRC Cards?
A
Class Responsibility Collaborators
2
Q
Name some Design Issues
A
responsibilities are not where they belong to / no distinction between simple and composite objects / few abstractions / long methods
3
Q
How does “Composite” work?
A
treat individual objects and compositions of objects uniformly, objects are composed into tree structure
4
Q
How does “Strategy” work?
A
define a family of algorithms, encapsulate each one, make them interchangeable
5
Q
Was is the difference btw. Strategy vs. Bridge?
A
same class diagram but strategy is meant for behavior and bridge for structure (you can use the bridge pattern approach to implement strategy pattern but not vice versa)