Question: Write a program that allows the user to convert up to 10 Fahrenheit temperatures to Celsius or Kelvin, then displays all of the data entered.

Write a program that allows the user to convert up to 10 Fahrenheit temperatures to Celsius or Kelvin, then displays all of the data entered. in java

/*

Write a program that allows the user to convert up to 10 Fahrenheit temperatures to Celsius or Kelvin, then displays all of the data entered.

The program should display the following menu of selections:

1. Convert Fahrenheit to Celsius (Centigrade)

2. Convert Fahrenheit to Kelvin

3. Display Data

4. Quit Program

The program will convert the Fahrenheit temperature to Celsius or Kelvin depending on the user's selection.

AssignmentSpecific Requirements (80 points 10 points each):

1) Write a void method/function named showMenu that displays the menu of selections. This method/function should not accept any arguments.

2) Write a void method/function named showCelsius, which accepts the Fahrenheit temperature as a floating point argument. The method/function should display the argument converted to degrees Celsius, with one digit after the decimal point. Convert degrees F to C using the following formula:

i. C = (5/9)(F 32)

3) Write a void method/function named showKelvin, which accepts the Fahrenheit temperature as a floating point argument. The method/function should display the argument converted to degrees Kelvin, with one digit after the decimal point. Convert degrees F to C using the following formula:

i. K = C + 273.15

ii. or

iii. K = (5/9)(F 32)+ 273.15

4) Create a 2D array of floats of size 10 by 3 to hold the F, C, and K temperatures.

a. When the user enters a valid temperature, the value should be converted into a F, stored in the array, the same number then converted to C, stored in the array, and last converted to K and stored in the array.

5) The program should continue to display the menu until the user enters 4 to quit the program.

6) The program should accept both positive and negative temperatures.

7) If the user selects an invalid choice from the menu, the program should display an error message.

8) If the user tries to enter more than 10 temperatures, the program should display an error message.

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!