Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please include comments Write a C++ program that inputs a maximum of 50 records from a sequential file. The program should insert the records into

Please include comments

Write a C++ program that inputs a maximum of 50 records from a sequential file. The program should insert the records into an ordered (maintain order at all times) array (ordered by Last_name in alphabetical order) based on the sample input file (employee.txt). The output should be printed into another file.

The program should sort the records by the last name, turn the beginning month, day, and year into one date (mm/dd/yyyy), and convert the department acronym into the department's name using the legend below, if the acronym does not exist ignore it and do not include in the output

Department codes AC accounting, MD medical, EG engineering, TE technical, PP -physical plant, ST staff, LW legal, Rd research TT testing, QC -quality control.

Input file will look like below

Hank Williams 09 12 1976 00 00 0000 120000.00 TE willaimshank@myemil.com Mary Johnson 07 15 1992 01 03 2020 78989.00 MD johnson.mary@myemail.com Allison Levington 08 17 1980 02 16 2016 45878.89 eg allisonterry@myemail.com Harrison Moody 01 01 2010 00 00 0000 98090.98 BB harrmody@myemail.com Betty Bonds 05 12 1990 09 12 2019 32398.89 TT Bondsbety@myemail.com

Output should be similar to

 Last Name First Initial Begin Date Department Name Williams H 09/12/1976 Technical Johnson M 07/15/1992 Medical Levington A 08/17/1980 Engineering Bonds B 05/12/1990 Testing

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

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

Label this diagram of a nephron. Ti-

Answered: 1 week ago

Question

Question Can I collect benefits if I become disabled?

Answered: 1 week ago