MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / City

Class City

Lab_21/city_temperature_control.cpp:18–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16void CityHumidityInfo(); // for temperature case 3
17
18class City {
19protected:
20 int cityID;
21 string cityName;
22 double cityClimateDate[12];
23
24public:
25 // inputing the data for ID and name
26 void input() {
27 cout << "Enter ID of the city: ";
28 cin >> cityID;
29 cout << "Enter Name of the city: ";
30 cin >> cityName;
31 }
32
33 int getCityID() {
34 return cityID;
35 }
36
37 void setCityID(int cityID) {
38 this->cityID = cityID;
39 }
40
41 string getCityName() {
42 return cityName;
43 }
44
45 void setCityName(string cityName) {
46 this->cityName = cityName;
47 }
48
49 // diplaying with the binary files
50 void GetData() {
51 cout << "ID NAME J F M A M I I A S O N D\n";
52 cout << left << setw(10) << cityID << setw(10) << cityName << " ";
53 }
54
55 virtual void setClimateData() = 0; // virtual functions
56 virtual void getClimateData() = 0;
57
58};
59
60class CityTemperature : public City
61{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected