C++
This exercise will provide practice with working with structuresand arrays. Although there might be many ways of doing theassignment, to get full credit, it must be done exactly asspecified here(for purpose of practice)
Write a program that will record information about employees andwill compute their paychecks. Each employee must be represented bya struct containing the last name, hours worked each day of theweek, the hourly rate, and the pay for the week.
Hours worked each day of the week must be and array storing 5values for the hours from Monday to Friday( The company is not openon Saturday or Sunday). This array will be inside thestructure.
There will also be an array of the employees; array ofstructures. There must be at least four (4) employees. The arraymust be declared in the main function of the program. Then theentire array must be passed to a function called 'initialize'. Thisfunction will ask the user to enter values for every field of everystructure, except for the pay for that week. ( the pay will becomputed in a different function)
A loop for processing the array of employees must be set up inthe main function. Inside the loop, a single employee will be pastto the function called 'compute', which will calculate the checkfor that employee. If the employee worked longer than 40 hours,overpay of 1.5 times the hourly rate is to be used for each hourworked over the 40 hours. For example, an employee who worked atotal of 50 hours for $10.00 an hour would make $550.00. Don't passthe entire array of employees into the 'compute'; the employeeswill be passed one at a time into the function, until all of theirpaychecks have been calculated, at which time the loop willterminate. The employee will need to be passed by reference.
A single employee must be passed into the result function, whichwill output the last name of the employee. Do not pass the entirearray of employees to the 'result' function. Each employee must bepassed through call by value, one at a time, until all of thepaycheck amount have been output at which time the loop in the mainfunction will terminate. Then the program will end.