previous
|
start
|
next
Example: An Educational Game (CRC Cards)
Whose responsibility is it to play a round?
The
Game
class
The
Player
class
It probably doesn't matter, so we will choose the Game class.
What happens in a round?
Make a time (uses Time class).
Draw a clock (uses Clock class).
Ask for input (uses Player class).
Check input (uses Clock class)
Ask again or increment score (uses Player class).
Game
play
Player
read player information
Clock
play round
Time
There is no need for Round and Level classes, so do not implement them.
previous
|
start
|
next