Create a Temperature class that internally stores a temperature in degrees Kelvin. Create functions named setTempKelvin, setTempFahrenheit, and setTempCelsius that take an input temperature in the specified temperature scale, convert the temperature to Kelvin, and store that temperature in the class member variable. Also, create functions that return the stored temperature in degrees Kelvin, Fahrenheit, or Celsius. Write a main function to test your class. Use the equations shown next to convert between the three temperature scales.
Kelvin = Celsius + 273.15
Celsius = (5.0/9) x (Fahrenheit – 32)
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.