Question: Input javascript For the input for your employee payroll calculator, you will use arrays that hold the employees names, employee type, hours worked, hourly rate,

Input javascript
For the input for your employee payroll calculator, you will use arrays that hold the employees names, employee type, hours worked, hourly rate, and gross pay. For employees with an employee type of Salary, their hourly rate will be zero, and their gross pay will be the amount due. For employees with an employee type of Hourly, their hourly rate will be the amount they earn per hour, and the Hours Worked will be the number of hours they worked. You will calculate Gross Pay by multiplying Hours Worked by Hourly Rate, and this will be the amount due.
Include the following five arrays in your program:
Name
Employee Type
Hours Worked
Hourly Rate
Gross Pay
Include the following five employees:
Employee 1
Name: Henry HandEmployee Type: SalaryHours Worked: 40Hourly Rate: 0Gross Pay: 4000
Employee 2
Name: Aaron AntEmployee Type: HourlyHours Worked: 35Hourly Rate: 75Gross Pay: 0
Employee 3
Name: Barbara BellEmployee Type: SalaryHours Worked: 40Hourly Rate: 0Gross Pay: 3000
Employee 4
Name: Conner CutlerEmployee Type: HourlyHours Worked: 40Hourly Rate: 100Gross Pay: 0
Employee 5
Name: Donald DockEmployee Type: HourlyHours Worked: 32Hourly Rate: 150Gross Pay: 0
Create a loop based on the number of employees. For each employee, if the Employee Type is Salary, use the Gross Pay as the amount due, or, if the Employee Type is Hourly, calculate the amount due by multiplying Hours Worked by Hourly Rate. Calculate the total number of hours worked, the total number of salary employees, the total number of hourly employees, and the total amount due (the gross pay of each employee added together).

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 Programming Questions!