Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ 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

C++

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 information into a list. You are free to use any list container we learned in class( parallel arrays, array 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

Proper Indentations

final.dat

Shae 75000 25 Cory 40000 24 Carlos 25000 40 Angel 50000 35 Shawn 100000 60 Charles 85000 62 Christina 30000 20 Tommy 40000 33 Michael 37500 28 Nia 50000 40 Holly 55000 32 Parker 45000 34 Beatrice 66000 58 David 120000 31 Yolanda 90000 47 Gail 70000 68 Lindy 80000 30 Sherry 33000 27 Zack 53000 34 Harry 65000 49

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

What are the main sources of work-related stress?

Answered: 1 week ago