Question: Write a program that reads data from a data file called final.dat. The data file contains the following information: Name Salary Age The program should

Write a program that reads data from a data file called final.dat. The data file contains the following information:

Name Salary Age

The program should store the information into a list. You are free to use any type of list container we learnt in class (parallel arrays, arrya of struct, linked lists, STL lists)

After storing the information into the list, the program should do the following:

Print the list out with an appropriate message before printing the list.

Print the average age of everyone in the list.

Print the name of the oldest person in the list.

Sort the list in increasing order by age.

Print the list after it has been sorted.

(Use proper indentation and comment everything also use c++)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!