in c++
In this exercise, we will read in a data file of employees (file is furnished to you, “employee.dat”):
- Employee SSN
- Employee Last Name
- Employee First Name
- Hours Worked
- Pay Per Hour
- Personal Income Tax Rate
You assignment’s logic is to:
- Read in the records from the file,
- Pass the Hours Worked, Pay Per Hour, Personal Income Tax Rate to a single function to determine:
- Whether or not overtime pay is computed (anything over 40 hours is overtime at 1.5 times the regular pay). Compute any overtime pay at 1.5 times pay rate
- Compute the regular pay at regular hours (40 hours or less)
- Compute the gross pay (Regular Pay plus any overtime pay)
- Compute the personal income taxes withheld
- Compute Net Pay (gross pay minus personal income taxes withheld)
- Pass ALL these values BACK to the main calling routine from this one function.
- Display:
- the Employee SSN,
- Last Name, First Name,
- Total Hours,
- Regular Hours,
- Overtime Hours (if any),
- Pay Per Hour,
- Personal Income Tax Rate,
- Regular Pay, Overtime Pay (if any),
- Gross Pay,
- Withheld Income Taxes,
- Net Pay.
this is my .dat file
123-45-6789 Kirk James 44.7 88.99 0.0175
124-89-0007 Bond Jane 45.6 65.75 0.04
405-77-8911 Puff Blossom 40 33.88 0.03
405-10-9871 Puff Buttercup 41.2 45.66 0.047
223-03-8761 Puff Bubbles 37.8 33.44 0.015
980-11-2201 Joneski Kasey 23.1 10.77 0.033
115-88-7619 Crooke I.M.A. 25.4 88.75 0.02
777-00-1232 Smith Alias 43.5 22.3 0.034
345-89-0022 DeMann Stan 56.7 29.45 0.065
210-37-1192 Jones Jeane 48.9 20.33 0.025
103-22-4321 Smith Alias 33.5 19.67 0.063