Question
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
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.
PLEASE CREATE A CODE USING A TEMPERATURE CLASS WITH THE C++ PROGRAMMING
THANK YOU
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started