Question: JAVASCRIPT: Need help with this assignment - Please give scrreen shots showing indentation for working coding and the code to copy and work with. Thank

JAVASCRIPT: Need help with this assignment - Please give scrreen shots showing indentation for working coding and the code to copy and work with. Thank you -

Level of Difficulty

This script requires a bit more work than usual; plan for that. It may also challenge you in terms of debugging. I recommend writing pseudocode for complex functions, turning it into comments to help document your code. I also recommend you write this in an iterative fashion, in small steps that you can verify before moving forward. Save copies of your code as you go, so you can go back if you need to.

Basic Information

Write a script that helps with weekly payroll at Ajax Inc. Here is some pertinent information about the company:

Ajax pays its employees $19.00 an hour.

Overtime hours (any hours above 40 hours) are paid at "time and a half" (1.5 times the normal rate).

The above information helps determine gross pay. Then, deductions are calculated:

Social Security is 6.2% of the gross pay.

Medicare is 1.45% of the gross pay.

Withholding has a couple of steps:

Multiply the number of allowances claimed by the employee by 77.90.

Deduct that from the gross pay, and calculate withholding on what remains.

While real withholding is complex, let's assume it's 20%, for simplicity's sake.

Output

The program should write out details, so the employee gets a paystub summary. Include employee name, hours, number of allowances, gross pay, SS, Medicare, WH, and net pay.

Functions

Write one function for calculating gross, plus one to calculate each of the deductions (Social Security, Medicare, and withholding).

Write one function that drives the whole payroll process. It should prompt the user for an employee name, the number of hours worked, and the number of withholding allowances. It should call other functions as necessary to perform calculations and display the pay stub.

Challenge Portion

Allow the entry of multiple employees, with a sentinel like DONE telling you when they are done entering payroll data.

Total all deduction categories (hours, gross pay, SS, Medicare, WH, and net pay) and count employees. Once all employees have been entered, show totals for each category.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!