Computer Science 1.
Added on - 16 Sep 2019
Computer Science 1Programming Assignment 6Functions & File I/O60 PointsThe data shown below is stored in a file named emp_data.txt. A copy of the data file is in D2Lunder Content for Unit 6. The data is stored with no column headings, a space between eachdata item and a return after the hours data for each employee.Employee #Dept.Pay RateExemptHours205147.54N4534986417.98Y3813283825.75Y4990547610.43N42213648.29N47659147.52N4154871425.75Y524326387.54N361267768.29N40Write a program to read the employee file and create a payroll register.Store the payroll register into a file named emp_pay.txt.The register should contain the following data:oEmployee number (print left-justified)oDepartmentoPay RateoExempt StatusoHours WorkedoBase Pay ( base pay = pay rate * hours worked (up to 40 hours))oOvertime Pay (only calculated for non-exempt employees, time-and-a-half for allhours worked over 40).oTotal payYour report should be printed in column format with a title and the message “End ofReport” at the end.You should have separate functions to:oRead a line of data.oCalculate the Base Pay, Overtime pay, and Total pay for one employee.oPrint one line in the report.Your program should work with files containing fewer or more records (lines) than thoseshown in the table above.