//------------------ // a room in a house //------------------ class Room { public: enum RoomType = {Kitchen, LivingRoom, DiningRoom, Garage, BedRoom, PowderRoom}; Room (int length, int width, int height, RoomType type); int Area( ) const; RoomType GetRoomType( ) const; // accessors, mutators private: int m_length; int m_width; int m_height; RoomType m_type; }; //--------------------------- // The address of a house //--------------------------- class Address { public: Address ( ); // accessors, mutators const string& GetStreet( ) const; const string& GetCity ( ) const; private: string m_street; string m_city; string m_state; int m_zipcode; int m_streetNr; }; //------------------------- // a house with an address // and rooms //------------------------- class House { public: House ( ); const Address& GetAddress( ) const; void AddRoom( const Room& room ); void AddDoor( ); int NrRooms ( ) const; void ListRooms( ) const; // accessors, mutators // other public methods const Room& GetRoom( int index ) const; private: Address m_address; vector< Room > m_rooms; int m_nrDoors; double m_yardSize; // acres }; //------------------------ // A community of homes //------------------------ class Community { public: Community( ); int NrHouses ( ) const; void ListStreets( ) const; void BuildHome (const Home& home ); const string& GetName( ) const; const House& GetHouse( int index ) const; // other public methods private: vector< House > m_homes; vector< string > m_streets; string m_name; // other potential uses of aggregation School m_school; PlayGround m_playground; Name m_president; };