Question
Objective: The primary purpose of this assignment is to synthesize the various concepts learned in Chapters 1 and 2 such that you demonstrate a working
Objective: The primary purpose of this assignment is to synthesize the various concepts learned in Chapters 1 and 2 such that you demonstrate a working knowledge of variable and constant declarations, input and output, use of data types and expressions, and control of flow (i.e. conditionals and loops) of the program.
Problem: Write a program for the accounting department of a production plant to process employees weekly pay. For each employee, the user is required to enter three data items: an ID number, the hourly wage, the number of hours worked during a given week. Pay calculation is based on the following: Each employee is to be paid double for all hours worked in excess of 40 (e.g., if an employee worked 35 hours at $12.5/hour, his gross pay is 35 * $12.5 = $437.50; if an employee worked 42 hours at $12.5/hour, his gross pay is (40 * $12.5) + 2 * (2 * $12.5) = $550.0).
A tax amount of 18% of gross pay will be deducted if the gross pay exceeds $1000 (e.g., a tax amount of gross pay $1550.00 is $1550.00 * 18% = $279.00 will be deducted to result in net pay = $1550.00 - $279.00 = $1271.00. Otherwise, the tax amount will be 15% of gross pay (e.g., a tax amount of gross pay $850.00 is $850.00 * 15% = $127.50 will be deducted to result in net pay = $850.00 - $127.50 = $722.50.
The program output should clearly show (with proper labels) the employees ID number, hourly wage rate, number of hours worked, gross pay, tax amount, and net pay.
The program should allow the user to continuously calculate employee payroll until the user decides to quit.
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