Question: 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
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
