[Solved] Change Calculator

$25

File Name: Change_Calculator.zip
File Size: 160.14 KB

SKU: [Solved] Change Calculator Category: Tag:
5/5 - (1 vote)

5/5 – (2 votes)

Starting with the downloadable assignment files, write the Javascript needed for the application. Use the book and lectures as a guide. Develop an application to determine how many quarters, dimes, nickels and pennies are needed to make the desired change for any amount between 0 and 99. One way to get the results is to use the divide and modulus operators along with the parseInt() method for truncating the results so they are whole numbers.

Open the HTML and JavaScript files in the week 3 zip folder:

1.Run the application to see the user interface shown above. The interface wont do anything until you develop the JavaScript for it. Add your first and last name to the title like this: FirstName LastName Change Calculator.

2. In the JavaScript file, note that the $ function has already been coded.

3. Code an event handler named processEntry() that gets the users entry and checks to make sure that it is a number between 0 and 99. If it isnt, display an alert dialog box for the error. If it is valid, call a function named makeChange() and pass it the users entry.

4. Code the makeChange() function, which should have one parameter that accepts the users entry. This function shouldnt return anything, but it should display the results in the text boxes for Quarters, Dimes, Nickels, and Pennies.

5. Code an onload event handler that attaches the processEntry() event handler to the click event of the Make Change button. Then, test the application.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Change Calculator
$25