Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

c++ Write a C++ program that will read 10 records into an array from a data file

ID: 3767680 • Letter: C

Question

c++

Write a C++ program that will read 10 records into an array from a data file. Each record should contain an employee ID, hours worked and pay rate. You should calculate a total pay and then write the record to an output file. The Record written should consist of Employee ID, hours worked, pay rate and total pay.

Excluding the main function, your program should have three additional functions that will get the employee id, hours worked, and payrate; another to calculate the total pay; and another to write your output to the output file.

Total pay should be calculated by multiplying the hours worked by payrate plus 10% of total pay for every five (5) hours over forty (40). (ie a person working 50 hours with a total pay of $100 would have ((50-40)/5)*(100*.1) added to total pay.

Data file (txt):

1263 30.5 10.25

4572 40.0 12.60

9472 35.8 9.50

6294 29.2 8.65

7382 34.3 9.26

8481 20.2 11.50

7438 33.1 16.00

9532 25.6 12.00

1834 44.5 10.00

6352 28.2 7.25

Description: DataType: Variables: Employee IDs of int employess_id Hours Worked of Double hrworked_id Pay Rate of Double payrate_id Total Pay of Double total_pay

Explanation / Answer

c++ Write a C++ program that will read 10 records into an array from a data file

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote