Files
WeatherService/Weather.cpp

16 lines
655 B
C++

#include "Weather.h"
Weather::Weather(const std::string& city, double lon, double lat, double temperature,
const std::string& weather, double windSpeed, int clouds)
: city(city), lon(lon), lat(lat), temperature(temperature),
weather(weather), windSpeed(windSpeed), clouds(clouds) {
}
void Weather::printWeather() const {
std::cout << "City: " << city << " (Lat: " << lat << ", Lon: " << lon << ")\n"
<< "Temperature: " << temperature << " deg. C\n"
<< "Weather: " << weather << "\n"
<< "Wind Speed: " << windSpeed << " m/s\n"
<< "Cloudness: " << clouds << " %\n";
}