§ The hourly rate should be pulled from a database using the employee ID as the primary key. § Calculate Gross Pay Amount § Overtime will be calculated on hours over 40 at 1.5 times the hourly rate. § Calculate the number of dependents x $25. § Calculate State Tax at 5.6% § Calculate Federal Tax at 7.9% § Calculate the pre-tax amount. § Calculate the pre-tax amount - the dependents x 25. § Calculate the post-tax amount. § Hint: state and federal taxes are calculated on pre-tax amounts § Follow good program standards by storing and defining your variables. § Create a minimum of 3 blocks for your program. § Each member of the team should write at least one block of code § You should show proof that you applied security checks. § You should provide evidence by creating testing scenarios and showing the test results.
Added by Sandra G.
Step 1
Sure! Let's break down the requirements step by step. Show more…
Show all steps
Your feedback will help us improve your experience
Shelayah Robinson and 87 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
An employee is paid at a rate of $16.78 per hour for the first 40 hours worked in a week. Any hours over that are paid at the overtime rate of one and one-half times that. From the worker's gross pay, 6% is withheld for Social Security tax, 14% is withheld for federal income tax, 5% is withheld for state income tax, and $10 per week is withheld for union dues. If the worker has three or more dependents, then an additional $35 is withheld to cover the extra cost of health insurance beyond what the employer pays. Write a program that will read in the number of hours worked in a week and the number of dependents as input and will then output the worker's gross pay, each withholding amount, and the net take-home pay for the week. For a harder version, write your program so that it allows the calculation to be repeated as often as the user wishes. If this is a class exercise, ask your instructor whether you should do this harder version.
Shelayah R.
(Financial application: payroll) Write a program that reads the following information and prints a payroll statement: Employee's name (e.g., Smith) Number of hours worked in a week (e.g., 10 ) Hourly pay rate (e.g., 9.75) Federal tax withholding rate (e.g., 20\%) State tax withholding rate (e.g., 9\%) A sample run is shown below: Enter employee's name: Smith |-Enter Enter number of hours worked in a week: 10 |- frater Enter hour7y pay rate: 9.75 / denter Enter federal tax withholding rate: 0.20 / - Enter Enter state tax withholding rate: 0.09 |-Enter Employee Name: Smith Hours Worked: 10.0 Pay Rate: $\$ 9.75$ Gross Pay: $\$ 97.5$ Deductions: Federal Withholding $(20.0 \%): \$ 19.5$ State Withholding $(9.0 \%): \$ 8.77$ Total Deduction: $\$ 28.27$ Net Pay: $\$ 69.22$
Create a basic application that calculates the gross and net pay for three employees working at your company. You can count on there only being three employees. You should collect (as inputs) each employee's name, hours worked, and hourly rate (3 variables x 3 employees = 9 variables). Also, collect the tax rate which will be the same for all employees. Finally, print out a nicely formatted table that looks something like the one provided in the MyEducator assessment description. If the number of hours worked is more than 40, then the pay rate should be 1.5 times the amount entered. If the number of hours is more than 60, then the pay rate should be 1.6 times the amount entered. Find a way to use both an elif and nested if statement as you meet this criterion.
Akash M.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD