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

The Company you work for has asked you to write a program that reads some hourly

ID: 3655168 • Letter: T

Question

The Company you work for has asked you to write a program that reads some hourly employee pay information from a file, calculates their Net Pay, and saves s formatted report to a file. The file has this info: George Washington 22.50 37 N Y 2, Steve Rogers 8.75 39.5 Y N, Isaac Newton 12 63 Y Y 1. Details: 1) The input file is called ( proj1data.txt ) and is in the folder S:mackayCS111. 2) There are only 3 hourly employee in the company, so there are only 3 lines of information in the input file. 3) Each line of input contains the following information for each employee, separated by spaces: a. First name (up to 20 characters) b. Last name (up to 20 characters) c. Hourly pay rate d. Number of hours worked. e. Whether or not they are in the union ('Y' or 'N') f. Whether or not they have health insurance ('Y' or 'N') * If they do have health insurance, there will be another integer indicating how many dependents they have for Example: Joe Smith 12.75 48 N Susan Storm 18.64 39.5 N Y 3 4) You must calculate the employee net pay based on the following: a. Their total earned is the rate times the hours b. If they are in the union, the union dues, $24, must be deducted from their pay c. If they have health insurance, their insurance premium of $10.34 per dependent must be deducted from their pay 5) The output will be stored in a file called proj1ResultsFirstLast.txt, where First and Last are YOUR first name and last name 6) The output will have this format: (using the example input from above) Last Name First Name Total Earned Union Dues Insurance Net Pay Smith Joe 612.00 24.00 0.00 588.00 Storm Susan 736.28 0.00 31.02 705.26 a.The employees Last Name and First Name should be left justified b.All the other information will be right justified, with 2 decimal places c.There should only be 1 header row, and underlining will be done as in the labs d.getting the output to format exactly will be difficult, because Wordpad, even though called a

Explanation / Answer

int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout
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