i need help with my program

i need to create c++class to store temperature. class should store temperature(magnitude) and scale (celsius, fahrenheit)class should have constructors as well as member functions to return the temperature in either scale.
i got this so far but not sure if its right and its not finished

#include <iostream>
#include <cstdlib>
using namespace std;
class Temperature{
public:
enum TemperatureScale{
celsius,
fahrenheit
};
private:
double value;
TemperatureScale scale;


public:
Temperature (double_value, TemperatureScale_scale): value(_value), scale(_scale){
};
double getCelsius(){
if (scale == fahrenheit) return (value - 32)/1.8;
return value;
}
double getFahrenheit(){
if (scale == celsius) return (1.8 * value) + 32;
return value;
}
Topic archived. No new replies allowed.