Question
CAN YOU HELP ME TO DO THIS EXERCISE PLEASE USING C++ Write a program that gives the user two options: (1) Transform a temperature value
CAN YOU HELP ME TO DO THIS EXERCISE PLEASE USING C++
Write a program that gives the user two options:
(1) Transform a temperature value from Celsius to Fahrenheit or (2) Transform a temperature value to Fahrenheit to Celsius.
The two options are communicated to the user by the console by means of "cout" with this text:
"If you want to transform from Fahrenheit to Celsius between character C (capital)." "If you want to transform from Celsius to Fahrenheit between the character F (capital)." After the user defines the temperature transformation option they want, type [ENTER]. And then enter the value of the temperature you want to transform.
The formula for the transformation is:
F = (0.9/5.0)*C+32.0;
Use and develop this key:
class TempUnitConversion{
private:
float celcius;
float farenheit;
public:
float getFarenheit(){
returnfarenheit;
}
void setFarenheit(float readFarenheit){
farenheit=readFarenheit;
}
float getCelcius(){
return celcius;
}
void setCelcius(float readCelcius){
celcius=readCelcius;
}
void changeCelciusToFarenheit(){
}
void changeFarenheitToCelcius(){
}
};
Each of these methods has to be used in the duty so that the duty is correctly done.
The main () function is used exclusively for the following:
(1) Instance an instance of the TempUnitConversion class (2) Receive the user's entries to determine:
(a)From what unit of temperature to which unit of temperature does the user transformation want to make. (b)The calculation value made by the instance of the TempUnitConversion class
(3) The output of the calculation made by the instance of the TempUnitConversion class
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