Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a personType class with the following attributes (variables), and behaviors (methods/functions). Private Variables string fName; string lName; string address: double height (inches) string DOB

Design a personType class with the following attributes (variables), and behaviors (methods/functions).

Private

Variables

string fName;

string lName;

string address:

double height (inches)

string DOB

char: gender

Public

functions

setters for all of your data members (variables)

getters for all of your data members

print. This function will print "All of the persons' information".

equals which takes another personType object as a parameter and compares all its members. Returns true is identical.

Create a driver program that creates 5 different people. After creating the 5 different people, neatly print them.

For this assignment, you will be dynamically creating an array of personType's from our previous assignments. For now, this will only be able to deal with the base class and not any derived classes.

1. Prompt the user for the number of people to create, then create an array of personTypes to hold them.

2. Loop through the array, prompting the user to enter the data as necessary using the corresponding setters.

3. Finally, loop through the array again and call the print method for each person.

4. Deallocate the array and quit.

Run your program for 5 people. Upload the .cpp, .h files along with a screenshot. Ensure to fill out all the data for each person.

Also, please try and do it without using pointers or vectors. Thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

What is the critical value of F on your Excel printout?

Answered: 1 week ago