INF 286 John Tyler Community College Html CSS Questions
Description
INF 286
Assignment #12
Instructor Dr. Hongmei Wang
Last Name: First Name:
Grade:
Comment:
Coding questions. The following question needs your complete HTML code.
Please follow instructions to solve the problems
Please start with the original code given in each subfolder
Modify files in the subfolder without modifying the file names.
Problem 1 (50%): Using JavaScript, create a simple web page that displays a Sales Tax Calculator, which accepts the user input on the sales subtotal and tax rate, and output the amount of sales tax and total amount of money that the user needs to pay.
Program Requirements: Your program must be written in JavaScript. In addition, you should follow the specific guidelines below.
The web page displays Sales Tax Calculator as below. It should include:
two input text boxes for the sales subtotal and tax rate, and
two disabled output text boxes for the sales tax and the sales total
one Calculate button and one Clear button.
When the user clicks on the button Calculate (5%) ,
(15%) the program validates each of the input text boxes, including Subtotal and Tax Rate, and gives an alert dialog about the reason why the input is incorrect if any of the input is incorrect. Each of the input is required and should be numeric and greater than 0.
(15%) If both input are valid, the text box for Sales Tax and Total will display the amount of sales tax and sales total respectively.
(15%) When the user clicks on the button Clear (5%), all the textbox are set to empty (10%).
- Others:
Please start with the original code given in the subfoler sales_tax
- Modify files in this subfolder without modifying the file names.
Problem 2 (50%): Using JavaScript, create a simple web page that displays a Change Calculator, which allows the user to enter amount of change due (0 99) in cents, and output the number of each type of coins as change.
Program Requirements: Your program must be written in JavaScript. In addition, you should follow the specific guidelines below.
The web page displays Change Calculator as below. It should include:
One input text box for the amount of change due in cents, and
Four disabled output text boxes for the number of quarters, dimes, nickels and pennies.
one Calculate button.
When the user clicks on the button Calculate (5%),
(15%) the program validates each of the input text box, and gives an alert dialog about the reason why the input is incorrect if the input is incorrect. The input is required and should be numeric and greater than 0.
(30%) If the input correct, the four output text boxes will display the number of four different types of coins. Hint: Instruction about how to calculate the number of different coins:
The number of quarters = parseInt(input / 25)
- input_dime = input%25
The number of dimes = parseInt(input_dime/10)
input_nickels = input_dime%10
- The number of nickles = parseInt(input_nickles/5)
- The number of pennies = input_nickles % 5
- Others:
- Please start with the original code given in the subfoler change_maker
- Modify files in this subfolder without modifying the file names.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."