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=32:
5private int temperature;
6private String freezerId;
private String location;
/* TO-DO: Create a method called setFreezer that takes 3 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:
1) throw a TemperatureTooHigh expection that passes two parameters:
getString(), and LIMIT
2) 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!