Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add code to the tempCheck ( ) method: 1 . If the temperature is greater than the constant LIMIT that they've set of 3 2
Add code to the tempCheck method:
If the temperature is greater than the constant LIMIT that they've set of it throws a TemperatureTooHigh exception with two parameters passed to it to use its overload constructor: getString and LIMIT.
tempCheck should return false if it throws the TemperatureTooHigh exception
Otherwise, tempCheck should return true
Hint: take a look at the TemperatureTooHigh.java file constructor to better understand # above
Code is:
public Boolean tempCheck throws TemperatureTooHigh
boolean tempOK false;
Show final code in Java
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started