
Specification:
Step 1)
Create a class called PairOfDice, composed of two six-sided Die objects. (see chapter 4 for Die.java)
Step 2)
Create a driver class called BoxCars with a main method that rolls a PairOfDice 1000 times and counts the number of "box cars" (double sixes) that occur. This important step will allow you to test your new class before having to use it in a complex application. You must fully test PairOfDice.java using BoxCars.java.
Step 3)
Using the PairOfDice class, write a class to play a game called Pig. The rules for Pig are listed below. Keep in mind that your program must be as robust as possible. You must fully test this application under the assumption that PairOfDice.java functions correctly.
Notes)
For this project you must write separate Analyses, Data Requirements, Algorithms, and Test Plans for each class. The one exception is BoxCars.java. You do not need a Test Plan for BoxCars.java because it is the test vehicle for the PairOfDice class. However, you must still write an Analysis, Data Requirements and an Algorithm for the BoxCars class.
(end of assignment)