Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Starting code and placeholders have been provided where the remaining code is needed. You'll need to do the following in your Freezer.java A . Create

Starting code and placeholders have been provided where the remaining code is needed. You'll need to do the following in your Freezer.java
A. Create a method called setFreezer that takes 3 parameters that are used to set the standard properties for the Freezer class object:
an integer for the temperature.
a String for the freezer id, and
a String for the location.
Add code to the tempCheck() method:
If the temperature is greater than the constant LIMIT that they've set of 32, 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
Create a getTemp() "getter" method that returns the temperature.
Create a getString() method that returns a String that reads as follows
"Freezer freezerID located at location is now showing temperature degrees F."
Create a getSafeString() method that returns a String that reads as follows:
"
SAFE: Temperature of temperature degrees F is within the safe operating range.
" 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

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

Students also viewed these Databases questions

Question

4. Identify the challenges facing todays organizations

Answered: 1 week ago