subject

(C++ Program) The All-Natural Wood Furniture Company has recently hired you to help them convert their manual payroll system to a computer-based system. Write a program to produce a 1-week payroll report for only one employee to serve as a prototype (model) for the administration to review. Input for the system will be the employee’s 4-digit ID number, the employee’s name, hours worked that week, and the employee’s hourlypay rate. Output should consist of the employee’s ID number, the employee’s name, the hours worked that week, the hourly rate, the gross pay, Federal withholding deduction based on an 18% tax rate, State withholding deduction based on a 4.5% tax rate, and net pay. Use main( ) as the driver function. Allow the user to run the program as many times as desired.
Write 5 functions that main( ) calls to accomplish the task:getData( ): Prompts the user for an employee’s 4-digit ID #, the employee’s name, the hours worked that week, and hourly pay rate. Criteria for data validation:
Employee ID must be an integer between 1000 and 9999, inclusive. Do not allow user to enter an ID number out of this range.
Hours worked must be greater than zero and less than 120. Do not allow user to enter the amount of hours worked outside of this range.
Hourly Rate must be greater than zero. Do not allow the user to enter a zero or a negative pay rate.
computeGrossPay( ): Computes gross pay earned by employee. An employee working more than 40 hours per week is compensated at time-and-a-half for every hour over 40.
computeDeductions( ): Computes the Federal and State withholding deductions using the rates listed above.
computeNetPay( ): Calculates the net pay for the employee.
displayResults( ): Displays the employee’s ID#, the employee’s name, the hours worked, the hourly pay rate, gross pay, Federal withholding amount, State withholding amount, and Net Pay.
Sample Input/Output:
Please enter the employee's 4 digit ID # and press
1468
Please enter the employee’s name:
Mary Jones
Please enter the amount of hours worked this week and press
36
Please enter the hourly pay rate for this employee and press
7.5
Employee ID: 1468
Employee Name: Mary Jones
Hours Worked: 36.00 hours
Hourly Rate: $ 7.50
Gross Pay: $ 270.00
Deductions:
Federal Withholding: $ 48.60
State Withholding: $ 12.15
NET PAY: $ 209.25
Would you like to calculate the net pay of another employee? Y or N y
Please enter the employee's 4 digit ID # and press
5634
Please enter the employee's name: Lucy Smith
Please enter the amount of hours worked this week and press
8978
ERROR: INVALID AMOUNT OF HOURS WORKED!
Please enter the amount of hours worked this week and press
4566
ERROR: INVALID AMOUNT OF HOURS WORKED!
Please enter the amount of hours worked this week and press
42
Please enter the hourly pay rate for this employee and press
-9
ERROR: INVALID Pay Rate!
Please enter the hourly pay rate for this employee and press
12.5
Employee: 5634
Employee Name: Lucy Smith
Hours Worked: 42.00 hours
Hourly Rate: $ 12.50
Gross Pay: $ 537.50
Deductions:
Federal Withholding: $ 96.75
State Withholding: $ 24.19
NET PAY: $ 416.56
Would you like to calculate the net pay of another employee?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:30
Write a program in plp assembly that counts up by one starting from zero (or one) inside a loop and writes this value to the leds every time the value is increased. the memory address of the leds is 0xf0200000. the table below shows the meaning and an example usage of the instructions covered in the video, plp instructions for project 1. instruction example usage meaning load immediate li $t0, 8 register $t0 is set to the value, 8. store word sw $t2, 0($t1) the value in register $t1 is used as the memory address. the value in register $t2 is copied into this memory address. add addiu $t4, $t3, 29 register $t4 is assigned the sum of 29 and the value in register $t3. jump j your_label_name the program jumps to the line following the label, "your_label_name: ". label your label name: defines a label called "your_label_name: " that can be jumped to
Answers: 2
question
Computers and Technology, 24.06.2019 17:50
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
question
Computers and Technology, 25.06.2019 07:00
The graph shows the number of chapters sarah read in a book each day of a week
Answers: 1
question
Computers and Technology, 25.06.2019 08:30
Which of these devices is usually the default for most home network?
Answers: 1
You know the right answer?
(C++ Program) The All-Natural Wood Furniture Company has recently hired you to help them convert the...
Questions
question
Social Studies, 09.07.2019 02:00
question
Mathematics, 09.07.2019 02:00
question
Mathematics, 09.07.2019 02:00