Question: Create a C + + class called address. The class has the following private data members: o line 1 string o line 2 string o
Create a C class called address. The class has the following private data members:
o line string
o line string
o zip string
o city string
o state string
Create public functions as follows:
o set and get functions to allow update and retrieval, respectively, of the contents of
each data member.
o displayAddress a function that displays the entire address
o inputAddress a function that prompts the user the enter data for each of the
address components. Check how you can use the C getline function to read a
line of data from an input stream
Create a default constructor that initializes each of the data member to the empty
string Also, display the message An object of the Address class is created
Make sure you use include guards and separate the class interface from the class
implementation
Create a small program to test the class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
