Question: In this assignment, you will write a Java program that gets a list of ten (Fahrenheit) temperatures from the user and then classifies them in

In this assignment, you will write a Java program that gets a list of ten (Fahrenheit) temperatures from the user and then classifies them in terms of whether water would freeze/boil/stay a liquid. Recall that in Fahrenheit, water freezes at temperatures 32 and below; water boils at temperatures 212 and higher; and water remains a liquid at temperatures in-between those boundaries.

Requirements

This program should contain a single class (called Proj3) with a main method. Your program should compile and run in BlueJ.

Here are additional tips/requirements for your program:

You must store your temperatures in a size-10 array of ints

Use one for-loop to get the temperatures and store them in the array. Then use a second for-loop to find all temperatures at which water would freeze, a third for-loop to find all temperatures at which water would boil, and a fourth for-loop to find all temperatures at which water would remain a liquid.

You may assume that the user will enter whole numbers for each temperature (which may or may not be negative)

You can use System.out.println(); (with nothing int he parentheses) to print a blank line

The user might not enter any temperatures where water would freeze (or boil, or remain a liquid). You don't need to handle that differently -- your program just won't print any numbers under that heading.

Your program should look exactly like the example above when it runs, except for the values of the inputs/outputs.

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!