You will write a Java program that will perform the following operations, in this order: 1) Input a series of three Fahrenheit temperatures (as doubles) from the keyboard. 2) Output the following for each temperature, all on the same line (i.e., a total of three lines of output, each with four labeled values): • The original Fahrenheit temperature • The temperature converted from Fahrenheit to Celsius • The temperature converted from Fahrenheit to Kelvin • The converted Kelvin temperature converted back to Fahrenheit Notes/Specifications: a) Display all values as floating point numbers to two decimal places. b) Clearly prompt all inputs and label all output explicitly. There should be no doubt what each output value is. All output must be uncluttered and easy to read. c) Have at least one blank line between each line of output. d) Research all conversion formulas and test aggressively to make sure your results are correct. e) The program consists of just one class. • You need to write three short static methods that will each perform one conversion of one value – e.g., F to C, F to K, K to F. Each of these methods must take a double as its only parameter and return a double. There is no input or output in these methods. • Your main() will handle the input and output, as well as calling your methods to compute the temperature conversions. Reminder: This is an individual assignment. All code must be your own. Take a look at each task and review your reading, notes, previous work, and code examples to find the right type of statement for the task. Feel free to ask me questions as needed. Take the time to make your code as optimal as possible. Don’t just turn in the first version – go back and look for unnecessary work you can refactor out. Additional notes on electronic submission: • When finished, upload (only) your .java file on Canvas as a .zip (compressed) file, because Canvas. Name your source file (and your class!) just like you did for Assignment 2, with this format: CIS231A3XXxx.java • Make sure the comments at the top of the file include the following: Your name, the class/assignment, the school/my name, and the due date. • Be sure that your code is properly aligned and easy to read. Indent the contents of your comment block and all code within brackets. Avoid long lines of code that run off of the screen. • Give your variables meaningful names that leave no doubt as to what they contain
You will write a Java program that will perform the following operations, in this order:
1) Input a series of three Fahrenheit temperatures (as doubles) from the keyboard.
2) Output the following for each temperature, all on the same line (i.e., a total of three
lines of output, each with four labeled values):
• The original Fahrenheit temperature
• The temperature converted from Fahrenheit to Celsius
• The temperature converted from Fahrenheit to Kelvin
• The converted Kelvin temperature converted back to Fahrenheit
Notes/Specifications:
a) Display all values as floating point numbers to two decimal places.
b) Clearly prompt all inputs and label all output explicitly. There should be no doubt
what each output value is. All output must be uncluttered and easy to read.
c) Have at least one blank line between each line of output.
d) Research all conversion formulas and test aggressively to make sure your results
are correct.
e) The program consists of just one class.
• You need to write three short static methods that will each perform one
conversion of one value – e.g., F to C, F to K, K to F. Each of these methods
must take a double as its only parameter and return a double. There is no input
or output in these methods.
• Your main() will handle the input and output, as well as calling your methods to
compute the temperature conversions.
Reminder: This is an individual assignment. All code must be your own. Take a look
at each task and review your reading, notes, previous work, and code examples to find
the right type of statement for the task. Feel free to ask me questions as needed.
Take the time to make your code as optimal as possible. Don’t just turn in the first
version – go back and look for unnecessary work you can refactor out.
Additional notes on electronic submission:
• When finished, upload (only) your .java file on Canvas as a .zip (compressed)
file, because Canvas. Name your source file (and your class!) just like you did for
Assignment 2, with this format: CIS231A3XXxx.java
• Make sure the comments at the top of the file include the following: Your name, the
class/assignment, the school/my name, and the due date.
• Be sure that your code is properly aligned and easy to read. Indent the contents of
your comment block and all code within brackets. Avoid long lines of code that run
off of the screen.
• Give your variables meaningful names that leave no doubt as to what they contain
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images