Question: Write a program that will read records from a file (create your data file by using data from sample below) and store them in a

Write a program that will read records from a file (create your data file by using data from sample below) and store them in a binary file. That file will then be used as input to create an output file of the information. The data file contains employee information consisting of name, social security, department ID, years employed, and salary. In addition to displaying the information of each record, the program will also calculate the average salary and years employed of all the records. This additional information is stored in the same output file.

Sample Data File: Bill Tarpon 182460678 789 8 30600 Fred Caldron 456905434 789 10 40700 Sally Bender 203932239 790 8 50000 David Kemp 568903493 790 9 60000

The output file should look like this: Name Social Security Department-ID Years-Employed Salary Bill Tarpon 182460678 789 8 30600.00 Fred Caldron 456905434 789 10 40700.00 Sally Bender 203932239 790 8 50000.00 David Kemp 568903493 790 9 60000.00 The average number of years employed is 8 The average salary is $45325.00

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!