Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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 Sensors

Explanation / 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;
       }

};

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote