i need to creat a themometer that can show the temperature in degrees C and in Degrees F depending on what the user puts in.
i am very new with clases and i am wondering if i am on the right tracks with this begining code?
Code:
//CLASSES
#include <iostream>
using namespace std;
class C_Themometer
{
private:
float mDegreesC, mDegreesF;
public:
int SetDegreesC(float DegreesC, float DegreesF)
{
mDegreesC = DegreesC;
mDegreesF = DegreesF;
}
void SetDegreesF()
{
}
int GetDegreesC(float& DegreesC, float& DegreesF)
{
cout <<"Please enter a temperature";
return mDegreesC = (9.0/5.0 * mDegreesC) + (32.0);
}
void GetDegreesF()
{
}
};
void main()
{
C_Themometer Deg1, Deg2;
int mDegreesC;
int mDegreesF;
system("pause");
}
if anyone can give me a few pointers that will help then it would be very helpfull.