Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Paycheck Version 2 Calculator The Paycheck Version 2 assignment requires that we create an application that calculates paycheck information. Save the paycheck.html form completed in

Paycheck Version 2 Calculator

The Paycheck Version 2 assignment requires that we create an application that calculates paycheck information. Save the paycheck.html form completed in the previous assignment as paycheck2.html and save the paycheck.js file completed in the previous assignment as paycheck2.js. The user inputs First Name, Last Name, Hours Worked, Hourly Pay Rate, FICA, State, and Federal Tax Rates. The application calculates and displays the Regular Hours, Overtime Hours, Regular Pay, Overtime Pay, Gross Pay, Total Taxes, and Net Pay. The application also performs the following user entry validation tests: 1. Ensure that Hours Worked is entered and is between 0 and 80. 2. Ensure 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! Because the user isnt entering Regular Hours and Overtime Hours as with the first paycheck assignment, you must use an If statement to test Hours Worked to calculate Regular Hours and OverTime Hours and Regular Pay and Overtime Pay. All Hours Worked over 40 are considered Overtime Hours while Hours Worked between 0 and 40 are considered Regular Hours. As with the previous assignment, Regular Pay is calculated as Regular Hours worked * Hourly Pay Rate. Overtime Pay is calculate as Overtime Hours * Hourly Rate * 1.5. All of the remaining Gross Pay, Total Taxes, and Net Pay variables are calculated as with the previous assignment.

The following attached screenshots demonstrate how the application works:

Based on the screenshots attached, requirements are as follows: 1. 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. 3. Create and debug a JavaScript file that processes the Paycheck information from the paycheck.html file that meets the following specifications a. Save the file as paycheck2.js in your Ch05/js subdirectory. b. Create a function that is called when the paycheck2.html form is submitted. The function must include the following information. 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. 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). 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. g. Regular Pay will be correctly calculated and formatted with the toFixed() method. h. Overtime Pay will be correctly calculated and formatted with the toFixed() method. i. Gross Pay will be correctly calculated and formatted with the toFixed() method. j. Fica Tax deducted will be correctly calculated. k. State Tax deducted will be correctly calculated. l. Federal Tax deducted will be correctly calculated. m. Total Taxes will be correctly calculated and formatted. n. The Employee Name will be correctly displayed. o. The Net Pay will be correctly calculated and formatted with the toFixed() method. p. The init() function will be correctly used. (1 Point) 4. Submit the paycheck2.html, styles.css, and paycheck2.js files to Blackboard.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions