Question: Build a simple payroll generator HTML page while using JavaScript to process inputted data and perform various calculations. Create a single HTML page and a
Build a simple payroll generator HTML page while using JavaScript to process inputted data and perform various calculations. Create a single HTML page and a single JavaScript file.
Create an employee payroll system that takes employee information and displays it in HTML as well as generate the overall totals. Consider that all employees will have similarities in their information. For example, each employee will have the following categories of information:
Employee Number
Employee Name
Employee Type hourly executive, manager, nonmanager
Gross Pay
Note that hourly and nonmanager employees have the same basic employee information as other employees listed above and they also have the additional information of Hours Worked and Rate of Pay. In addition, for hourly and nonmanager employees, the Gross Pay information is calculated by multiplying Hours Worked by Rate of Pay.
Use the string below
Hank HandSalaryAaron AntHourlyBarbara BellSalaryConner CutterHourlyDonald DockHourlyEmma EvilSalaryFrank FunkSalaryGreg GrubHourlyHeather HealthSalaryIan IcklHourly
to use as input for your employee payroll system. This string contains information for employees using a pipe character to delimit information about a specific employee and a comma to separate employees. Hourly and nonmanager employees will have values for Hours Worked and Rate of Pay, but executive and managers will have zero for both of these values.
For each employee, display the following information in a table:
Employee Number
Employee Name
Employee Type
Hours Worked only if the employee type is hourly or nonmanager
Gross Pay
In a separate table, while using JavaScript, include a table that displays the total numbers:
Total employees processed
Total hourly employees processed
Total executive employees processed
Total manager employees processed
Total nonmanager employees processed
Total Gross Pay processed
Complete the following:
Create an HTML page with a single input text box at the top with a label of Payroll Input. Put the payroll input string your instructor provided you with in the course announcement into this Payroll Input text box when you run the page.
On the HTML page, add a button with display text of Calculate Payroll.
When the Calculate Payroll button is clicked, execute JavaScript code that will read the string from Payroll Input and parse out the employees and information for each employee.
Also, while parsing out the information, add up the total numbers eg total employees, total hourly employees, etc. including total gross pay.
After parsing out all of the information, display a table with employee information for five employees across the page in one row and five employees across the page for a second row.
When the information is being displayed, it should be displayed read only.
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
