Hi
Im working on an if statement with the following specifications:
If the methods argument is between 1 and 4 it should set the value of its
"setting" instance variable to the value of the int argument. The method
should then return a string showing the current setting – "setting1",
"setting2", "setting3" or "setting4" depending on whether the "setting" instance variable
has been set to 1, 2, 3 or 4. If the argument is not in the range it should return the string "out of range"
the code I have so far is:
public String whatSetting(int aNumber); { if ((aNumber > 0) && (aNumber < 5)) { this.setting = aNumber; if (this.setting() == 1))
I am now stuck on how to get it to return the different strings depending on the value of "setting" and return the "out of range" string if the argument is out of range.
thanks in advance to anyone who can help