Chapter 5 - Design & Implementation Flashcards

1
Q

What are CRC Cards?

A

Class Responsibility Collaborators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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

How does “Composite” work?

A

treat individual objects and compositions of objects uniformly, objects are composed into tree structure

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

How does “Strategy” work?

A

define a family of algorithms, encapsulate each one, make them interchangeable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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)

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