// CS2310 Exercise 10 // (Header file address.h) // // Name ___________________________ // // Chapter 14, p822 - 3, 4, 5 // // The following class represents a person's mailing // address in the United States. Using inheritance, we // want to derive an international address class, // InterAddress, from the Address class. For this // exercise, an international address has all the // attributes of a U.S. address plus a country code // (a string indicating the name of the country). The // public operations of InterAddress are Write (which // reimplements the Write function inherited from // Address) and a class constructor that receives // five parameters (street, city, state, zip code, // and country code). Write a class declaration for // the InterAddress class. // // Implement the InterAddress class constructor // // Implement the Write function of the InterAddress // class. using namespace std; class Address { public: void Write() const; Address( /* in */ string newStreet, /* in */ string newCity, /* in */ string newState, /* in */ string newZip ); private: string street; string city; string state; string zipCode; }; class InterAddress : public Address { public: void Write() const; InterAddress( /* in */ string newStreet, /* in */ string newCity, /* in */ string newState, /* in */ string newZip, /* in */ string newCountry ); private: string country; };