Using an Instance method
I have my constructor written, but I need to execute an Instance variable called reset() which will call the method reset and place a dot into the middle of a square.
Here is my constructor
* Constructor for objects of class Dice
public Dice(Square bg, Circle tL, Circle tM, Circle tR, Circle mid, Circle bL, Circle bM, Circle bR)
background = bg;
tL = topLeftSpot;
tM = topMiddleSpot;
tR = topRightSpot;
mid = middleSpot;
bL = bottomLeftSpot;
bM = bottomMiddleSpot;
bR = bottomRightSpot;
here is the instance method
public void reset()
I can compile the class with out any errors but when I run it the square appears but the dot does not appear in the center like it should. I just can't get the reset to work. I'm sure its a simple fix but as I'm new to Java everything seems complicated
Thanks for any help
I wish you'd gone back to your old thread to say you'd fixed it. It's a little rude not to, you know.
And use code tags, please.
On the point of the topic...what does face1() do?
I have that fixed for you but I'm still getting the Illegal expression error with the next piece of code
Originally Posted by Tolls
face1(); places an Orange square with 1 blue dot in the middle.
OK, well there's nothing in the code you've posted that tells us anything about what's going on, or what could be wrong.
i'm still stuck on (i)
trying to initialise the instance variables with the arguments