Write the \"weather\" class needed in this c++ project. \"Sensors that can detec
ID: 3712269 • Letter: W
Question
Write the "weather" class needed in this c++ project.
"Sensors that can detect humidity and temperature will be able to analyze and differentiate various weather conditions. A light sensor will determine the setting for the LED accordingly. The data picked up from these sensors will be stored and sent to the location (i.e. city)."
Design Specifications (UML with Descriptions Streetlight Controller GPS Streetlight +getweather double getight0: double getTraffic0 double getStreetLightO: double +setCommunication: void Light Weather Communication Traffic getLight0: double Motion Humidity Temperature SensorsExplanation / Answer
class Weather{
private:
double humidity;
double temperature;
public:
Weather(double h, double t){
humidity = h;
temperature = t;
}
double getHumidity(){
return humidity;
}
double getTemperature(){
return temperature;
}
void setHumidity(double a){
humidity = a;
}
void setTemperature(double a){
temperature = a;
}
};
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.