Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone do this in JOptionPane though? Programming Fundamentals II Java Lab #3 Flow of Control NAME Problem: Write a program that will display a

Can someone do this in JOptionPane though?

Programming Fundamentals II Java Lab #3 Flow of Control NAME Problem: Write a program that will display a temperature conversion table. The user will input the BEGINNING Celsius temperature, the ENDING Celsius temperature, and the temperature INCREMENT for display in the table. The program should then convert and display the temperature results in the form Celsius to Fahrenheit to Kelvin. The formula for the conversion is as follows: DegreesF = ( DegreesC * 9/5) + 32 Kelvin = Celsius + 273.15 Your program should make use of the Scanner class or the JOptionPane 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. Im looking for a nicely formatted conversion table with the decimal points aligned one under the other. Working on the Lab: Create a folder with your name as the name of the folder (YourLastName ) In your favorite IDE, begin work on the lab. o Use the folder as the source/destination of the project/files When finished working the lab, zip the folder into ONE file Go into Canvas and submit the lab as usual using the zip file. Requirements: You will submit the following with this lab: Face-to-face classes: a. A copy of the cover page submitted in class. b. A printout of source code (program listings). Staple the two together. All sections: Submit through Canvas as normal Output should be as follows: Left border, Fahrenheit temp, formatted value, vertical line, formatted Celsius, vertical line, formatted Kelvin, vertical border Celsius Faren. Kelvin ----------------------------------------- | 0.00 | 32.00 | 273.15 | | etc. | etc. | etc. | . . . . | 100.00 | 212.00 | 373.15 | ------------------------------------------------- Algorithm: - Perform program setup and initializations - Prompt the user and input the starting Celsius temperature. - Prompt the user and input the ending Celsius temperature. - Prompt the user and input the temperature increment, in degrees Celsius. - Print out the table header - Loop through the range of temperatures and generate the table o Calculate the corresponding temperature in Fahrenheit. o Calculate the corresponding temperature in Kelvin o Display/output the three temperatures o Increment to the next Celsius temperature o Proceed with another iteration of the loop - Terminate the program. - Test, test, test, and test some more. - And when youre done, test it again.

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 Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions