Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class Freezer { private final int LIMIT = 3 2 : 5 private int temperature; 6 private String freezerId; private String location; / *
public class Freezer
private final int LIMIT:
private int temperature;
private String freezerId;
private String location;
TODO: Create a method called setFreezer that takes parameters:
an integer of the temperature, a String for the freezer id and a String for the location.Those values are used to set the standard properties for the Freezer object.
public boolean tempCheck throws TemperatureTooHigh
boolean tempOK false;
COMPLETE THE CODE HERE PER INSTRUCTIONS:
If the Temperature has exceeded the limit:
throw a TemperatureTooHigh expection that passes two parameters:
getString and LIMIT
returns false from the method
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