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
Name: Henry HandEmployee Type: SalaryHours Worked: Hourly Rate: Gross Pay:
Employee
Name: Aaron AntEmployee Type: HourlyHours Worked: Hourly Rate: Gross Pay:
Employee
Name: Barbara BellEmployee Type: SalaryHours Worked: Hourly Rate: Gross Pay:
Employee
Name: Conner CutlerEmployee Type: HourlyHours Worked: Hourly Rate: Gross Pay:
Employee
Name: Donald DockEmployee Type: HourlyHours Worked: Hourly Rate: Gross Pay:
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
