Question: please helpp mee, write in c++ i need fast i need fast prof pleasee Task 6: Write a main function to perform the following tasks:

please helpp mee, write in c++ i need fast





i need fast prof pleasee
Task 6: Write a main function to perform the following tasks: (5 marks) a) Declare one-dimensional array variable with 50 elements for a structure type Employee b) The function may need to call the functions that are defined in the previous task to produce the output as shown in Figure 4. Note: Please use proper output formatting c) Figure 4 shows the complete output that will be displayed on the screen based on the data in the input file "input, txt" shown in Figure ! SALARY (FM) OT PAY (1) LASICERI OT (HOUR) DEPARTMENT NAME 27 45 53 Salman 11 Hanit Haikai Rashid Abu Halimasis Hani Imran Arina Hakim Ana Omar Zarith and Rania Hannan Buharl Burhan Citra Shari Amit Artad Daud Kanin Sofian Saad Alisa Awan 58 35 27 36 33 2500.00 1000.00 2000.00 1800.00 2400 00 2300.00 2500.00 1900.00 2350.00 2250.00 2250.00 2250.00 2180.00 2500.00 2450.00 Production Quality Production Production Quality Ingineering Accounting Quality Engineering Engineering Quality Accounting Accounting Engineering Accounting 270.00 51250 530 00 500.00 402.50 405.00 450.00 379 30 780.00 660.00 437.00 450.00 512.50 S25.00 362.50 2770.00 2317.50 2530.00 2380.00 2802.50 2705.UD 2050.00 2279.50 3130.00 2910.00 2687.00 2700.00 2692.50 1025.00 2012 50 39 3 41 35 29 DEPARTMENT Production Quality Engineering Accounting TOT OF PAYM 1380.00 1736.50 2270.00 1775 00 TOT. SALARY (2) 7680.00 100H6.50 11770.00 11155.00 Figure 4: Complete output for the data from the input file "input. txt" Task 1: Declare a structure named Employee, with the following members (3 marks) a) Name b) Department c) Basic salary d) Number of overtime hours worked in one month c) Overtime pay D Total salary including overtime pay Task 2: Write a function named road Input (14 marks) a) li receives an array of Employee of type atruct b) The function should read data from the given input file named input.txt The file contains employces department, basic salary, number of overtime hours worked in one month and name Figure 1 shows an example of data that can be used to test the program e) Assuming you do not know, the number of employees Calculate the number of employees available in the company based on the number of employee records found in the input file d) The function should return the number of employces calculated in (c) Production 2500 27 Balan All Quality 1800 45 Hanar Haikal Production 2000 5 Rahid Abu Production 100D 50 Hali Hashim Quality 2400 35 Hani Imran Engineering 2300 21 Arina Hakim Accounting 2500 36 Anuar Omar Quality 1900 Zarith zaid Engineering 2350 52 Fania Harran Engineering 2290 4 Buhari Burhan Quality 2230 10 Citra Shari Accounting 2250 16 Amir Arshad Accounting 21H041 Daud kasi Engineering 2500 15 Dorian and Accounting 2450 29 Alina Ana Figure 1: Sample data in the input file "input txt" Task 3: Write a function named determinoRate (6 marks) a) It takes the department name as an input paramcler b) The function should return an overtime rate based on the information given in Table 1 2 Department Quality Production Accounting Engineering Table 1 Overtime Rate (RM per hour) 11.5 10.0 12.5 ISO Task 4: Write a function named displayOutput (Il marks) a) This is a non-returning function b) It takes an array of Employee of type struct and the number of employees calculated in Task 2 as input parameters c) The function should display employees' names, department, baste salary, number of overtime (OT) hours worked in one month, monthly overtime (OT) pay, and monthly salary. The formula for calculating monthly overtime (OT) pay and monthly salary is as follows: Monthly overtime (OT) puy-Overtime vale * Number of overtime hours worked Monthly salan - Monthly overtime pay . Basic salary d) Figure 2 shows an example of the output that will be displayed on the screen based on the data in the mput file "input.txt" shown in Figure 1 HATE DEPARTMENT BASIC SALARTINI Salman All Tianit Haiti Pand Halim Hashim an Intan Hali Anta Tarithala Panian Hari Burhan Citra Sari it Arad Production Quality Production Production Quality Engineering Accounting OLY Engineering Engineering Quality Account Accounting Engineering Mounting 250000 300000 2000 DO 180000 2800.00 230000 250000 100 DO 25000 225000 2250 00 2250.00 210000 2500.00 2450.00 OT IROURIOT PATIE 27 270.00 511 50 53 530.09 50 BHO:00 35 402 50 27 405.00 JE 0 00 1950 52 80.00 44 0.00 437.00 35 450.00 512 50 35 525.00 1650 2770.00 2317.50 253000 230.00 2002.50 2705.00 293000 2279.90 3133.00 2910.00 267.00 2.700.00 2692.50 1025.00 2012.50 Borland Alisa Arman Figure 2: Expected output for Task 4 Task 5: Write a function named displayAnalysis (17 marks) a) This is a non-returning function b) It takes an array of Employee of type struct and the number of employees calculated in Task 2 as input parameters c) The function should display departments names, total monthly overtino (OT) pays, and total monthly salary d) Figure 3 shows an example of the output that will be displayed on the screen based on the data in the input file "input.txt" shown in Figure I 3 DEPARTMENT Production Quality Engineering Accounting TOT OT WATER 13 1716 30 3370.00 1775.00 TOT SALARY RHI T6R0.00 1000650 11770.00 1115 00 Figure 3: Expected output for Tak 5 Task 6: Write a main function to perform the following tasks: (5 marks) u Declare one-dimensional array variable with 50 elements for a structure type Employee b) The function may need to call the functions that are defined in the previous task to produce the output as shown in Figure 4. Note: Please use proper output formatting c) Figure 4 shows the complete output that will be displayed on the screen based on the data in the input file "input.txt" shown in Figure 1. RE LEPAPIRENT LASIC OT (RO) CT PAYERN) SALARY) Sisiman A11 Itant? Raikal Danhid Ahu Malin Hashim Hani Imran Arina la Anuat Omat Earth Eald Rania Hanson Iluta Durhan Citra Shari Amir Aralind Daud Kasim Sofia Saad Alisa Aiman Production Quality Production Production Quality Engineering Accounting Quality Engineering Engineering Quality Accounting Accounting Engineering Accounting 2500.00 1800.00 2000.00 1800.00 2000 00 200.00 2500.00 1900.00 2350.00 2250.00 2250.00 2250.00 2180.00 2500.00 245000 27 45 S3 SB 35 27 36 33 52 44 38 36 62 270.00 51750 510.00 500.00 402.50 405.00 450.00 379.50 180.00 660.00 37.00 450.00 512 90 525.00 362.50 2770.00 2.317.50 2530.00 2380.00 2007.50 2705.00 2.950.00 227.50 3130.00 2910.00 268.00 2700.00 2692.50 3025.00 2012.50 29 DEPARTMENT Production Quality Engineering Accounting TOT. OT PAY) 138000 1736 50 2370.00 1725 00 TOT SALARY RH) 7680.00 10086,50 1170.00 11155.00 Figure 4: Complete output for the data from the input file "input.txt" Task 7: List all function prototypes (4 marks) Task 8: You must ensure your program fulfill the following criteria
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
