Question: Java Solution Description Fahrenheit to Celsius/Kelvin Conversion 1. Create a class called Temperature. 2. Add a main method to this class. 3. In the main

Java

Java Solution Description Fahrenheit to Celsius/Kelvin Conversion 1. Create a class called

Solution Description Fahrenheit to Celsius/Kelvin Conversion 1. Create a class called Temperature. 2. Add a main method to this class. 3. In the main method do the following: a. Declare a variable called fahrenheit and assign the value 450.0 to it. This variable should be the smaller of the two primitive types that can hold floating point numbers. b. Declare a variable called celsius. This variable should be the larger of the two primitive types that can hold floating point numbers. On the same line as the declaration, calculate the equivalent Celsius temperature based on the fahrenheit variable. The formula for this is: Celsius Value = (Fahrenheit Value - 32)/1.8. Declare a variable called kelvin. This variable should be the larger of the two primitive types that can hold floating point numbers. For now, assign the value of celsius to the kelvin variable. d. Using a Compound Assignment Operator, (e.g. *=), calculate the equivalent Kelvin temperature based on the Celsius temperature stored in the kelvin variable. The formula for this is: Kelvin Value = Celsius Value + 273.15. Print out to the console each of the variable values, each on a new line in this order: {fahrenheit value } { celsius value} {kelvin value} f. For the specified values, your output should be: 450.0 232.22222222222223 505.3722222222222 C. e

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!