May 2012
Intermediate to advanced
679 pages
16h 56m
English
In the analysis, we have identified seven objects. Now we can group the objects:
Group 1: Board, House, Snake, Ladder, Pebbles
Group 2: Dice
Group 3: Player
A careful analysis will reveal that though snakes and ladders are objects they do not move or change state. Hence, the class board should include snakes, ladders, houses, and pebbles as its integral part and not separate objects.
It leaves us at only three basic objects namely board, dice, and player. Figure 22.2 shows the class diagrams.
Figure 22.2 Class diagrams
Now we have to study the interaction between the classes. In ...
Read now
Unlock full access