Question: Please use C++ for this problem. Create a Temperature class that contains private member variables for degrees in Kelvin, Celsius, and Fahrenheit. Your class should

Please use C++ for this problem.

Create a Temperature class that contains private member variables for degrees in Kelvin, Celsius, and Fahrenheit. Your class should also contain mutator and accessor functions for each of the variables. The mutator function for degrees in Kelvin should recieve a double value and use that value to set degrees in Kelvin. The mutator functions for degrees in Fahrenheit and degrees in Celsius should use the following equations for conversion: Kelvin = Celsius + 273.15 Celsius = (5.0/9) * (Fahrenheit - 32) In main(), test the implementation of your class. Prompt the user to enter a temperature in degrees Kelvin, and then use the Temperature class member functions to convert and display the value in degrees Celsius and degrees Fahrenheit.

Sample: EnteratemperatureindegreesKelvin:103.5 TemperatureafterconvertingtoCelsius:-169.65 TemperatureafterconvertingtoFahrenheit:-273.37

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!