Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6 . 1 Fahrenheit to Kelvin ( Individual Assignment ) Rules This is an Individual Assignment. You must complete this assignment on your own. Do

6.1 Fahrenheit to Kelvin (Individual Assignment)
Rules
This is an Individual Assignment. You must complete this assignment on your own.
Do not collaborate or share code with other students.
Do not copy and paste code from anywhere.
Especially from Chegg or Course Hero, or Stack Overflow, or from anywhere you found through a Google Search
Students copying or sharing code will be reported to the Dean's office
for violating the Academic Integrity Policy and for disciplinary action.
Before you make a serious mistake and risk your grade and enrollment at ASU, please see your instructor for help.
Do not use any resources outside of those provided in the course materials.
Do not use any language features that have not been covered to this point in the course materials.
Do not use any language features that are explicitly forbidden in these instructions.
If you get stuck or need help, please use the help systems provided in this course.
Copyright 2021 Arizona State University - This content is protected and may not be shared, uploaded, sold, or distributed in whole or part. Copying any part of these instructions or any part of a solution and sharing online or otherwise in any form is a violation of copyright laws and the ASU Academic Integrity Policy. All violations will be prosecuted.
Required Skills Inventory
Use variables to name, store, and retrieve values
Use System.out.print to prompt the user for input
Use a Scanner to collect user input
Use math operators to construct expression
Output to console with System.out.printf
Use format specifiers to format floating point values
Use escape sequences to include special characters in a String
Write a method according to given specifications
Write a method that takes arguments and returns a value
Write a method that calls another method
Use parameter variables in a method body
Write a return statement
Use math operators to construct an expression
Problem Description and Given Info
Write a public static method named FahrenheitToKelvin that will take a single argument of type double and will return a double. When called, and passed a temperature value (in Fahrenheit), this method must compute and return the Kelvin temperature equivalent. You must also write a small program in the main method that will:
prompt the user to enter a temperature value in Fahrenheit
collect and store the user's input in a double variable
call the FahrenheitToKelvin method, passing the user's input as an argument
store the value returned by the FahrenheitToKelvin method in another double variable
Display the Kelvin equivalent value as shown in the Examples below
Here are some examples of what the user should see when the program runs.
Example 1
Enter temperature in Fahrenheit : 100
100.00 degrees Fahrenheit is 310.93 Kelvin
Example 2
Enter temperature in Fahrenheit : -20.25
-20.25 degrees Fahrenheit is 244.12 Kelvin
For the given inputs, make sure that your program output looks exactly like the examples above (including spelling, capitalization, punctuation, spaces, and decimal points).
Helpful Info: Fahrenheit to Kelvin formula
Fahrenheit to Kelvin formula

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_2

Step: 3

blur-text-image_3

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 Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions