What does this code do?
It is an implementation of the class described by this UML diagram
|
Die |
|
totalSides : int ( =6 unless otherwise specified) value : int ( = random value from [1,totalSides] ) |
| getValue() : int howManySides() : int roll() : int (randomly selects a new value and returns this) |
In no particular order, we considered the code above and used it as a discussion point for...