Created
July 22, 2018 18:43
-
-
Save gayashanbc/8110f3a2845daeccd0fec64349ab508c to your computer and use it in GitHub Desktop.
Implementation file of the Client class (Observer Pattern in C++)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by shan on 4/7/17. | |
// | |
#include "Client.hpp" | |
void Client::update(float temp, float humidity, float pressure) { | |
// print the changed values | |
std::cout << "---Client (" << id << ") Data---\tTemperature: " << temp | |
<< "\tHumidity: " << humidity | |
<< "\tPressure: " << pressure | |
<< std::endl; | |
} | |
Client::Client(int id) { | |
this->id = id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment