Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using c++ Task 5: Write a fimction named displayanalysis. a) This is a non-returning function. b) It takes an array of Employee of type struct
using c++
Task 5: Write a fimction named displayanalysis. 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 overtime (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 1. 3 DEPARTMEN Production SOT. OT PAY( 1380.00 1736.50 2370.00 1775.00 TOT. SALARY () 7680.00 10086.50 11770.00 11155.00 Ragining Accounting Figure 3: Expected output for Task 5 Task 6: Write a main function to perform the following tasks: 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 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. KAME DR (HOUR) SALARY OF PAY (10) 270.00 517.50 530.00 560.00 402.50 405.00 450.00 379.50 780.00 DEPARTMENT BASIC(10 Production 2500.00 Quality 1800.00 Production 2000.00 Production 1800.00 Quality 2400.00 Engineering 2300.00 Accounting 2500.00 Quality 1900.00 Engineering 2350.00 Quality 2250.00 Accounting 2250.00 Accounting 2180.00 Rngineering 2500.00 Accounting 2450.00 sor. OT PAY (11 1380.00 1736.50 2370.00 1775.00 27 45 53 58 35 27 26 33 52 44 38 36 41 25 29 Salman 411 Hanit Halkal Rashid Abra Hallahin An Intan Arina Hakim Anuar onar Lasith said Rania Kassan Bhari Burhan citra shari Amir Arshad Daud Kasim Sofian Sand Alla Asnan DEPARTMENT Production Quality Engineering Accounting 2770.00 2317.50 2530.00 2380.00 2802.50 2705.00 2950.00 2279.50 3130.00 2910.00 2687.00 2700.00 2692.50 3025.00 2812.50 2250.00 660.00 437.00 450.00 512.50 525.00 362.50 TOT. SALARY (100) 7680.00 10086.50 11770.00 11155.00 Figure 4: Complete output for the data from the input file "input.txt" Task 7: List all function prototypes. Task 8: You must ensure your program fulfill the following criteria: a) The program is able to run b) All required header files are includedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started