[20] Dice are used in many games and other applications. You are
to write a die class. For purposes of this class, a die must have at
least 4 sides and no more than 12. You must implement the following methods:
- constructors -- ensure that the number of sides and value on top is valid
- setSides(int sides) -- set the number of sides on the die; if the number
on top the die is larger than the new number of sides, the top will be
reset randomly
- roll() -- randomly changes the number on top of the die
- sides() -- returns the number of sides on the die
- top() -- returns the value on the top of the die
Test your class with the dieTest.cc client program provided in $L/dieTest.cc.
Your header file must be documented so that a potential user of this class will know how each method affects the die.