Question
Hello, I am not sure how to answer this. The instructions are not very clear and I don't have any leads. // Chapter 13, Programming
Hello, I am not sure how to answer this. The instructions are not very clear and I don't have any leads.
// Chapter 13, Programming Challenge 4: Personal Information Class
#include
#include
using namespace std;
// PersonalInfo class declaration
class PersonalInfo
{
private:
string name;
string address;
int age;
string phone;
public:
// TODO: Default constructor
// Sets all fields to null or 0.
PersonalInfo()
{
// TODO
}
// TODO: Overloaded Constructor
// Parameters: n is the name
// addr is the address
// a is the age
// p is the phone
PersonalInfo(...)
{
// TODO
}
// TODO: Mutator functions
// TODO: Accessor functions
};
// Function prototye
void displayPersonalInfo(PersonalInfo);
// Demo program
int main()
{
// Create the first instance of PersonalInfo.
PersonalInfo me("Herb Dorfmann", "27 Technology Drive", 25, "555-1212");
// Create an instance for a family member.
PersonalInfo auntSally("Sally Dorfmann", "48 Friendly Street", 50, "555-8484");
// Create an instance for a friend.
PersonalInfo joe("Joe Looney", "191 Apple Mountain Road", 30, "555-2222");
// TODO Display the data in each object.
return 0;
}
//**************************************
// The displayPersonalInfo function *
// displays the data in a PersonalInfo *
// object. *
//**************************************
void displayPersonalInfo(PersonalInfo obj)
{
// TODO: Display PersonalInfo to console
}
Sampe output:
Name: Herb Dorfmann
Address: 27 Technology Drive
Age: 25
Phone: 555-1212
Name: Sally Dorfmann
Address: 48 Friendly Street
Age: 50
Phone: 555-8484
Name: Joe Looney
Address: 191 Apple Mountain Road
Age: 30
Phone: 555-2222
Press any key to continue . . .
Your help is very much appreciated.
Thanks in advance.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started