Question
USING C++ (30 points) A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage
USING C++
(30 points) A company pays its employees as managers (who receive a fixed weekly salary), hourly workers (who receive a fixed hourly wage for up to the first 40 hours they work and time- and -a-half 1.5 times their hourly wage for overtime hours worked ), commission workers (who receive $250 plus 5.7 percent of their gross weekly sales), or pieceworkers (who receive a fixed amount of money per item for each of the items they produce). Write a program to compute the weekly pay for each employee. You do not know the number of employees in advance. Each type of employee has its own pay code: Managers have code 1, hourly workers have code 2, commission workers have code 3, and pieceworkers have code 4. The program should prompt the user to enter a pay code and the appropriate facts your program needs to calculate each employees pay according to that employees pay code. The user enters -1 to end the program.
Sample run:
Payroll Program
1. Managers
2. Hourly workers
3. Commission workers
4. Pieceworkers
Enter pay code (-1 to end): 3
Commission worker selected.
Enter gross weekly sales: 300
Commission worker's pay is $267.10
Enter pay code (-1 to end): 4
Pieceworker selected.
Enter number of pieces: 100
Enter wage per piece: 35.70
Pieceworker's pay is $3570.00
Enter pay code (-1 to end): 1
Manager selected.
Enter weekly salary: 1500
The manager's pay is $1500.00
Enter pay code (-1 to end): 2
Hourly worker selected.
Enter the hourly salary: 25
Enter the total hours worked: 45
Worker's pay is $1187.50
Enter pay code (-1 to end): -1
Have a good day!
Submission Instruction:
Submit your source file via Canvas by the beginning of the class on March 2, 2018.
You only need to submit your source code le (.cpp).
Step 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