Write a Thermostat holding a target temperature, starting at 20. setTarget accepts values from 10 to 30 inclusive and ignores anything else. warmer adds one degree, still respecting the limit. getTarget returns it.
class Thermostat { Thermostat(); void setTarget(int t); void warmer(); int getTarget(); }
Examples
There are also 4 hidden tests you can't see. Solve the problem, not the examples.