Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an HTML5 file that contains a HTML form like the screenshots shown above that accepts the First Name, Last Name, Hours Worked, Hourly Rate,

Create an HTML5 file that contains a HTML form like the screenshots shown above that accepts the First Name, Last Name, Hours Worked, Hourly Rate, Fica Tax Rate, State Tax Rate, and Federal Tax Rate for entry and shows the Regular Hours Worked, Overtime Hours Worked, Regular Pay, Overtime Pay, Gross Pay, Total Taxes, Employee Name, and Net Pay and a submit button with the label Calculate. Save the file as paycheck2.html and store it in your Ch05directory. The paycheck2.html file must be free of errors and validated. Add the necessary

code to link to a CSS file called styles.css that is stored in your Ch05/css subdirectory. Add the necessary code to use the paycheck2.js file that is stored in your Ch05/js subdirectory. (5 Points) 2. Download the styles.css file and store it in your Ch05/css subdirectory. (1 Point) 3. Create and debug a JavaScript file that processes the Paycheck information from the paycheck.html file that meets the following specifications (43 Points Total as broken down below): a. Save the file as paycheck2.js in your Ch05/js subdirectory. (1 Point) b. Create a function that is called when the paycheck2.html form is submitted. The function must include the following information. (3 Points) c. Output variables for the Regular Hours, Overtime Hours, Regular Pay, Overtime Pay, Gross Pay, Total Taxes, Net Pay, and Employee Name return results to the paycheck2.html file. (2 Points) d. Input variables for the First Name, Last Name, Hours Worked, Hourly Rate, Fica Tax, State Tax, and Federal Tax use the document.getElementByID method to retrieve input from the paycheck2.html file). (2 Points) e. An if then else statement will be used to ensure that Hours Worked is entered and is between 0 and 80 and that Hourly Pay Rate is entered and is between 0 and 100.00. If both of the above conditions are not met, an error message alert window appears that says the following: Please enter valid hours and a valid payrate! (10 Points) f. An if then else statement will be used to determine Regular Hours and Overtime Hours wherein Hours Worked over 40 are Overtime Hours and Hours Worked between 0 and 40 are Regular Hours. (10 Points) g. Regular Pay will be correctly calculated and formatted with the toFixed() method. (2 Points) h. Overtime Pay will be correctly calculated and formatted with the toFixed() method. (2 Points) i. Gross Pay will be correctly calculated and formatted with the toFixed() method. (2 Points) j. Fica Tax deducted will be correctly calculated. (1 Point) k. State Tax deducted will be correctly calculated. (1 Point) l. Federal Tax deducted will be correctly calculated. (1 Point) m. Total Taxes will be correctly calculated and formatted. (2 Points) n. The Employee Name will be correctly displayed. (1 Point) o. The Net Pay will be correctly calculated and formatted with the toFixed() method. (2 Points) p. The init() function will be correctly used. (1 Point)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions