-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeatherData.h
46 lines (40 loc) · 1.04 KB
/
WeatherData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
WeatherData:
Represents the current weather data and includes temperature, humidity, pressure, and other relevant information.
May also include historical weather data for the location.
Has a relationship with WeatherForecast as it provides the current weather information that will be used to provide the weather forecast.
*/
#ifndef WEATHERDATA_H
#define WEATHERDATA_H
#include <iostream>
class WeatherData
{
private:
double humidity;
double windspeed;
double temperature;
public:
WeatherData() {
humidity = 0.0; windspeed = 0.0; temperature = 0.0;
}
WeatherData(double hum, double wind, double temp) : humidity(hum), windspeed(wind), temperature(temp) {}
void setHumidity(double hum) {
humidity = hum;
}
void setWindSpeed(double wind) {
windspeed = wind;
}
void setTemperature(double temp) {
temperature = temp;
}
double getHumidity() const {
return humidity;
}
double getWindSpeed() const {
return windspeed;
}
double getTemperature() const {
return temperature;
}
};
#endif