Salary Calculator
Design a page like the following
Basics (style) You must have some CSS. The body should have a non-default – Background color – Color – Font family The text inputs should be right justified. The button should not be default gray.
Basics (interaction) You must use jQuery. The user enters the hourly wage in a text input. The user enters the numbers of hours worked in a text input. The user clicks a button and the weekly salary is calculated and displayed.
Calculation If the user worked less than 40 hours, then the salary is the hours times the hourly wage, e.g. 30 hours at $10.00 an hour gives $ If the user worked more than 40 hours, then he/she makes the regular wage for the first 40 hours and 1.5 * wage for each hour exceeding 40. e.g. 50 hours at $10.00 hour gives $ (40* (50-40)*1.5*10.00).
User Interaction If user changes the hourly wage, clear out your answer. Use the key-down event. If the user changes the number of hours worked, clear out your answer. If the user enters a wage which is not a number (isNaN), alert him/her to the problem and do not calculate.
User Interaction (Cont.) If the user enters a number of hours that is larger than 84, alert him/her to the problem and do not calculate. If the user enters a wage which is not a number, alert him/her to the problem and do not calculate. Display the result formatted as currency – with dollar sign and two decimal places (toFixed).