An IT company would like to calculate the weekly wages of itsemployees and the total payroll that…

An IT company would like to calculate the weekly wages of itsemployees and the total payroll that the company pays every week(total payroll = sum of all the employees'wages). The normalworked hours per week for an employee is 40. However, an employee can workmore and get extra payment. Each employee is identified byanempNum number.He gets payRatefor every normal hour, and 1.5payRate for every extra hour.

Write a C++ program that asks the users to enter the employees'numbers and calculate then their wages and the total payroll. Theprogram stops whenever the user enters0. It outputs a file thatcontains the following:

empNumpayRate
hours
wages
Example:
Enter employeenumber: 14569
Enter pay rate:50
Enter hoursworked: 45
Wage = 2375

Enter employeenumber: 18519
Enter pay rate:60
Enter hoursworked: 44
Wage = 2760

Enter employeenumber: 0
Total payroll is = 5135
The output file should contain the following information:

1456950452375
1851960442760

Table of Data

All data should be recorded into the filepayfile.dat.Write then a program to read the file payfile.dat and displaysthen thecontent on the screen.

Find the following:

1. The employee who earns the highest salary. Givehis number and wage.
2. Find the average wages of all employees.
3. Find the average payment per worked hour thatthe company pays.
4. Ask the company to enter its weekly income. Seethen if there is some deficit or benefit. Note that the company'sexpenses are salaries andindirect costs which represent 20% of thesalaries.

"Is this question part of your assignment? We can help"

ORDER NOW

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *