previous |
start |
next
Example: An Educational Game (CRC Cards)
- First we list the nouns:
| Player |
Clock |
Time |
| Level |
Game |
Round |
- Level is just an integer between 1 and 4; it
doesn't need a class.
- Start with a simple class: the Clock
class.
- When a clock draws itself, it must draw the
hands to show the current time.
- To get the current time, it must collaborate
with the Time class.
- How does the clock know what time it is? You
need to tell it:
previous |
start |
next