There are three deliverables for this exercise. The new class and the unit test will have Javadoc comments or Python docstrings.
The Wheel class.
A class which performs a unit test of building the
Wheel class. The unit test should create
several instances of Outcome, two instances
of Bin, and an instance of
Wheel. The unit test should establish that
Bins can be added to the
Wheel.
A class which performs a demonstration of selecting random
values from the Wheel class. Since the
Bins will be returned in a random order,
this is difficult to call a formal test. The demonstration should
include the following.
Create several instances of
Outcome.
Create two instances of Bin that
use the available Outcomes.
Create one instance of Wheel that
uses the two Bins.
A number of calls to the next
method should return randomly selected
Bins.
Note that the sequence of random numbers is fixed by the
seed value. The default constructor for a random number generator
creates a seed based on the system clock. Your unit test can set a
particular seed value for the random number generator within the
instance of Wheel; this will deliver a
fixed sequence of numbers that can be used to get a consistent
result.