text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

City.h

Go 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

Generated on Sun Aug 27 22:03:18 2006 for AWLogo by  doxygen 1.4.6