| RHS => Allan => Basic Programming => Exercises => DiceGame |
Updated:
02/02/2004 23:36 WebMaster: allanhn@rhs.dk |
DiceGame
Pair-programming must be used!!
Download and save the following 4 files:
Die.java, Player.java, Dicegame.java and DiceApp.java
They're an implementation of the DiceGame example from Larman (Chap. 1.6).
Run the class DiceApp.
Each pair should discuss the 4 classes until you're sure that
you fully understand them.
Be very specific and point out what is data, what is methods and so on.
Extend the application so it can add the two values and write the result on the screen.
Extend the application so it uses three dices.
Extend the application so the dices are thrown twice for every run.
Write the values and the sum for every run (maybe even the average for the
two throws)