Hi,

Not sure where to start here or what detail you will need, as you can guess, I'm pretty darn new to all this! Ok, here goes. I am working through an assignment, in this particular section I need to write

"...a public instance method which takes a single int argument and returns no value. The method should first check that its argument is in the range 1 to 6 (inclusive). If it isn't the method should display in a dialogue box a message, if the value of the argument is in the correct range the mehod should send one of the 'face' messages to the recevier, this. For example if the value of the argument is 1, the method should send the message face1() to the receiver etc.."

So what I guess I need to do here is something along the lines of:

if face is >= 6 or <=0
display the message
else
send the message facex() to the receiver

I've tried different ways to acheive this, but I'm getting no where fast.

The latest way I have written this is:

 public int changeFace()
   {
        int n;
        if ((n >= 6) || (n <= 0))
         {
            OUDialog.alert("Argument to changeFace() message " +  (n) +" is out of range");
         }
        else
         {
            return this.changeFace(n);
         }
    }

but when I try to compile in BlueJ I get an error: "changeFace() in Dice cannot be applied to (int)"

I'm not sure how much detail is required, so I've tried to include what I think is relevant, but if there is anything else that is of use, please let me know

Thanks!