Answered step by step
Verified Expert Solution
Link Copied!

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=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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions