Question: Implement the Thermometer class from Self-Test Exercise 16 on page 60. Make sure that the methods to alter the temperature do not allow the temperature
Implement the Thermometer class from Self-Test Exercise 16 on page 60. Make sure that the methods to alter the temperature do not allow the temperature to drop below absolute zero (–273.16°C). Also include these extra methods:
1. Two accessor methods that return the maximum temperature that the thermometer has ever recorded (with the return value in either Celsius or Fahrenheit degrees)
2. Two accessor methods that return the minimum temperature ever recorded
3. A modification method to reset the maximum and minimum counters
4. A boolean method that returns true if the temperature is at or below 0°C.
Step by Step Solution
3.17 Rating (172 Votes )
There are 3 Steps involved in it
public class Thermometer private double temperatureInCelsius private ... View full answer
Get step-by-step solutions from verified subject matter experts
