Question: In C + + , Create a class object called person that contains a First Name, Last Name, and Age. Your main ( ) function
In C Create a class object called person that contains a First Name, Last Name, and Age. Your main function should declare an array of up to person objects, and load each line from the input file into an object in the array.
The person class should have the following private data elements:
First name
Last name
Age
The person class should have the following functions:
Null Constructor
Get read first name, last name, and age from an input stream
Put write last name, first name, and age to an output stream
The person class should have the following operators:
compare the person to another person, using Last name, First name, then age, and return a bool
Your program should do the following:
Prompt the user for the name of the file
Open the file
Read the data into the array of person objects maximum size
Close the file
Sort the array
Display the arrayCreate a class object called person that contains a First Name, Last Name, and Age. Your main function should declare an array of up to person objects, and load each line from the input file into an object in the array.
The person class should have the following private data elements:
First name
Last name
Age
The person class should have the following functions:
Null Constructor
Get read first name, last name, and age from an input stream
Put write last name, first name, and age to an output stream
The person class should have the following operators:
compare the person to another person, using Last name, First name, then age, and return a bool
Your program should do the following:
Prompt the user for the name of the file
Open the file
Read the data into the array of person objects maximum size
Close the file
Sort the array
Display the array
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
