Reference no: EM132164398
Using C++,
Design a class that holds the following personal data:
name
address
age
phone number
Write appropriate accessor and mutator functions.
getName
getAddress
getAddress
getPhone
setName
setAddress
setAge
setPhone
The class should have the following constructors:
A default constructor that assigns empty strings ("") to the name, address, and phone member variables, and 0 to the age member variable.
A constructor that accepts the following values as arguments and assigns them to the appropriate member variables: name, address, age, and phone.
Demonstrate the class by writing a program that creates three instances of it.
One instance should hold your information, and the other two should hold your friends' or family members' information. Dsplay them.
Sample Run My information: Name: Joe Doe Address: 15 Main Drive Age: 50 Phone: 408-555-1111 My family meber's information: Name: Jane Doe Address: 123 Bay Street Age: 45 Phone: 408-555-1212 My friend's information: Name: Henry Smith Address: 111 Stelling Road Age: 30 Phone: 408-555-2222