I have a project to cpomplete and am desperate for some help. i've been trying to get my head round it for days, but it a non event..>I would seriously appreciate if anyone could look at this for me...?
Instances of the Dice class model a single playing dice. Dice have six faces with 1, 2, 3, 4, 5 and 6 spots; opposing faces always add up to 7. An instance of Dice is made up of an orange square and 7 circles. Our dice are two dimensional and we mimic the six sides of the dice by changing the colours of the circles. Different numbers of circles are either orange or blue depending on which face of the dice is facing you. The six faces of an instance of Dice are shown in Figure 2.
Figure 2 The six faces of a dice
So for example the face of the dice with 5 spots is graphically represented as an orange square with 5 blue circles and 2 orange circles (which cannot be seen against the orange background); the face of the dice with 2 spots is graphically represented as an orange square with 2 blue circles and 5 orange circles.
The Dice class is incomplete and your task in this question is to complete it. Open the BlueJ editor on the Dice class and note the declaration of the instance variables and their associated getter methods. Note that setter methods are not provided as you will be directly assigning objects to the instance variables in a constructor that you will write, and once an instance of Dice is initialised we will not be assigning other objects to the instance variables. Read the initial comments of the other methods to gain an understanding of what they do as you will be using them in your answers. (Do not worry about the delay() method for now; it will be explained in part (iv) (c).)
(i) Delete the default constructor for the Dice class and then write a new constructor for the Dice class with the following header:
public Dice(Square bg, Circle tL, Circle tM, Circle tR,
Circle mid, Circle bL, Circle bM, Circle bR)

Anyone able to help a damsel in distress...?

7 Years
Discussion Span
Last Post by Puzzledbuthappy
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.