| 16 | void CityHumidityInfo(); // for temperature case 3 |
| 17 | |
| 18 | class City { |
| 19 | protected: |
| 20 | int cityID; |
| 21 | string cityName; |
| 22 | double cityClimateDate[12]; |
| 23 | |
| 24 | public: |
| 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 | |
| 60 | class CityTemperature : public City |
| 61 | { |
nothing calls this directly
no outgoing calls
no test coverage detected