Design and implement a Java program that determines if the water used to brew co
ID: 646592 • Letter: D
Question
Design and implement a Java program that determines if the water used to brew coffee is the correct temperature. The program asks a user to input the water temperature to brew coffee.
** If the water is less than 88 C, the program should throw a TooColdException. The program should catch the exception and show a message stating the temperature should be at least 88 C.
** If the water is between 88 C and 93 C, the program should show a message stating that the temperature is fine for brewing.
** If the water is above 93 C, the program should throw a TooHotException. The program should catch the exception and show a message stating that the temperature should be less than 93 C.
Explanation / Answer
public class TemperatureAndDay { public static void main(String[] args) { double [] temperature = new double [4]; temperature[0] = 45.24; temperature[1] = 67.30; temperature[2] = 55.23; temperature[3] = 49.20; temperature[4] = 50.22; } }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.