Write a Dimmer holding a brightness from 0 to 10, starting at 5. brighter adds one and dimmer takes one away, both staying inside the range. isOff returns true at 0.
class Dimmer { Dimmer(); void brighter(); void dimmer(); int getLevel(); boolean isOff(); }
Examples
There are also 3 hidden tests you can't see. Solve the problem, not the examples.