Checkpoint 17.8.1.
Class
Address
has a m_streetAddress
, m_city
, and m_zip
. Class Contact
is shown below. If a Contact
is asked to do the following tasks, which ones sound like they should be handed off to the m_address
to do?
class Contact {
public:
...
private:
string m_name;
string m_email;
Address m_address;
};
- Check if the contact is in a particular city.
- Update the contactโs street address.
- Get the address of the contact in the format โ123 Main, Town 12345โ.
- Get the contactโs name
- Update the contactโs email