Question: Write a program that will display a temperature conversion table. The user will input the beginning Fahrenheit temperature, the ending Fahrenheit temperature, and the temperature

Write a program that will display a temperature conversion table. The user will input the beginning Fahrenheit temperature, the ending Fahrenheit temperature, and the temperature increment for display in the table. The program should then convert and display the temperature results in the form Fahrenheit to Celsius. The formula for the conversion is as follows: Celsius = ( 5 / 9 ) * ( Fahrenheit 32 ) Your program should make use of the Scanner class, whichever you DID NOT use for Lab-2. Use the same class for BOTH input and output. Also, make sure to use formatting with the output. That is, be consistent with the number of decimal places used ( 2, 3, or 4 ). Hint, use the DecimalFormat class. Output: Left border, Fahrenheit temp, formatted value, vertical line, formatted Celsius, vertical border Faren. Celsius --------------------------- | 32.00 | 0.0000 | | etc. | etc. | . . . . | 212.00 | 100.0000 | --------------------------- Algorithm: - Perform program setup and initializations - Prompt the user and input the starting Fahrenheit temperature. - Prompt the user and input the ending Fahrenheit temperature. - Prompt the user and input the temperature increment. - Print out the table header - Loop through the range of temperatures and generate the table o Get the next Fahrenheit temperature o Calculate the corresponding temperature in Celsius. o Display/output the two temperatures o Increment to the next Fahrenheit temperature o Proceed with another iteration of the loop - Terminate the program. - Test, test, test, and test some more.

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!