Question: Java, create flowchart and uml 4. Temperature Class Write a Temperature class that will hold a temperature in Fahrenheit and provide methods to get the
4. Temperature Class Write a Temperature class that will hold a temperature in Fahrenheit and provide methods to get the temperature in Fahrenheit, Celsius, and Kelvin. The class should have the fol- lowing field: ftemp. A double that holds a Fahrenheit temperature. The class should have the following methods: Constructor. The constructor accepts a Fahrenheit temperature (as a double) and stores it in the ftemp field. setFahrenheit. The setFahrenheit method accepts a Fahrenheit temperature (as a double) and stores it in the ftemp field. getFahrenheit. Returns the value of the ftemp field, as a Fahrenheit temperature (no conversion required). getCe1sius. Returns the value of the ftemp field converted to Celsius. getkel vin. Returns the value of the ftemp field converted to Kelvin
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
