MinMax is a gadget for registering maximum and minimum
temperature values. Temperatures are input to the gadget and the
user can at any time ask the highest and the lowest temperature
that MinMax has received. At the beginning of its use, MinMax sets
both the values to 0.0. Also later the gadget can be reset to have
zero values. The user can ask, whether MinMax is at the initial
state, or if he can rely on the temperature values.
Implement the gadget as a class MinMax, which has a constructor
and the following accessors:
- public void registerTemperature(double)
- public double minimum()
- public double maximum()
- public void reset()
- public boolean modified()
Take into account: When the first temperature is registered,
it is both the highest and the lowest temperature thus far.
(12 points)