Question: Write a Freezing Exception class.Also, write a TemperatureMonitor class that contains two methods:a ) The checkTemperature method can throw a FreezingException - If the temperature
Write a Freezing Exception class.Also, write a TemperatureMonitor class that contains two methods:a The checkTemperature method can throw a FreezingException If the temperature falls below degree, it throws the exception with the message"Temperature is freezing!" otherwise, it prints "Temperature is normal" and prints the temperature value.b The main method has an integer array of temperatures: Call the checkTemperature method in main that checks each temperature in the array if it is freezing or normal.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
