In the first phase I have to implement two classes, Die and PairOfDice. The public methods of Die are Die(), int getTopValue() and void roll()
A good place to start would be to write out a skeleton for your class, Die. Write the class definition for Die, define its member variables* and methods. You can leave the bodies of the methods empty for now as you think about what to put in them.
*You didn't mention member variables, but I can think of at least one you are going to want.
For example, say I wanted to write out a skeleton of code for a class called Test. Test has the following methods: Test(), int getValue(), void setValue(int x). It also as a int member variable, value. My stubbed out code would look like:
class Test {
// Test's member variables. These keep track of the current state of a Test instance.
int value;
Test() {
// Fill me in later!
}
int getValue() {
// Fill me in later!
}
void setValue(int x) {
// Fill me in later!
}
}
Now let's see what you come up with for your Die class. You can start filling in the methods if it become apparent what they should accomplish. Or, if you don't know how to accomplish it in code, but know what you want the methods to do, write it out in comments inside the method body.