![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
City.hGo to the documentation of this file.00001 00015 class City : public KeyedItem 00016 { 00017 public: 00018 City() : KeyedItem() {} 00019 City(const string& name, 00020 const string& ctry, 00021 const int& num) 00022 : KeyedItem(name), country(ctry), pop(num) {} 00023 string cityName() const; 00024 int getPopulation() const; 00025 void setPopulation(int newPop); 00026 private: 00027 // city's name is search-key value 00028 string country; // city's country 00029 int pop; // city's population 00030 }; // end City |