JAVASCRIPT/HTML/CSS.. MODIFY THE ORIGINAL CODE TO PRODUCE DESIRED PROBLEM RESULTS - MOST WORK WILL BE IN JS ORIGINAL CODE IS PROVDED BELOW...


JAVASCRIPT/HTML/CSS..




MODIFY THE ORIGINAL CODE TO PRODUCE DESIRED PROBLEM RESULTS - MOST WORK WILL
BE IN JS ORIGINAL CODE IS PROVDED BELOW


*-----------------------------------------------------------------------------*
ORIGINAL CODE
*-----------------------------------------------------------------------------*
HTML:










   Make Change








Change Calculator




















































*-----------------------------------------------------------------------------*
JAVASCRIPT:


const $ = selector => document.querySelector(selector);
*-----------------------------------------------------------------------------*


CSS:


body {
font-family: Arial, Helvetica, sans-serif;
background-color: white;
margin: auto;
width: 600px;
border: 3px solid blue;
}
h1 {
   color: blue;
   margin-top: 0;
}
main {
padding: 1em 2em;
}
div {
   margin-bottom: 0.5em;
}
label {
   float: left;
width: 16em;
text-align: right;
}
input {
margin-left: 1em;
}
#calculate {
   margin-bottom: 1em;
}


*-----------------------------------------------------------------------------*


Problem 2<br>:Using JavaScript, create a simple web page that displays a Change Calculator,<br>which allows the user to enter amount of change due (0 - 99) in cents, and output the number of<br>each type of coins as change.<br>Program Requirements: Your program must be written in JavaScript. In addition, you should<br>follow the specific guidelines below.<br>• The web page displays Change Calculator as below. It should include:<br>o One input text box for the amount of change due in cents, and<br>o Four disabled output text boxes for the number of quarters, dimes, nickels and<br>pennies.<br>one Calculate button.<br>Change Calculator<br>Enter amount of change due (0-99): 67<br>Calculate<br>Quarters: 2<br>Dimes: 1<br>Nickels: 1<br>Pennies: 2<br>When the user clicks on the button Calculate,<br>the program validates each of the input text box, and gives an alert dialog<br>about the reason why the input is incorrect if the input is incorrect. The input is<br>required and should be numeric and greater than 0.<br>If the input correct, the four output text boxes will display the number of<br>four different types of coins. Hint: Instruction about how to calculate the number<br>of different coins:<br>• The number of quarters = parseInt (input / 25)<br>input_dime = input 25<br>The number of dimes = parseInt (input_dime/10)<br>• input_nickels = input_dime10<br>The number of nickles =<br>parseInt (input_nickles/5)<br>The number of pennies = input_nickles 5<br>

Extracted text: Problem 2 :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: o One input text box for the amount of change due in cents, and o Four disabled output text boxes for the number of quarters, dimes, nickels and pennies. one Calculate button. Change Calculator Enter amount of change due (0-99): 67 Calculate Quarters: 2 Dimes: 1 Nickels: 1 Pennies: 2 When the user clicks on the button Calculate, 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. 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_dime10 The number of nickles = parseInt (input_nickles/5) The number of pennies = input_nickles 5
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here