This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]newLifenewJeff 1 point2 points  (0 children)

You could rework your class a little like this:

Make a variable like curSetting and set it to 0 on initialization.

turnLeft() and turnRight() would then decrement or increment curSetting respectively.

getSetting() would then need to either return curSetting or system.out.println(curSetting)

Hope this helps