Computer Applications for Business Assignment
JavaScript Event-Driven Programming
To get credit for this assignment:
Learning Objectives:
This assignment is designed to practice:
1. Understand the basic input and output mechanisms of dynamic web applications from the code perspective
2. Implement JavaScript code which will handle user events
3. Display feedback of said processed interactions back to the user
4. Practice your understanding of basic JavaScript from the prior Assignment
a variables, including;
i The declaration, initialization and assignment processes
b Use of the conditional if statements
c Use of arithmetic and logic operators
d Use of comments
Directions:
You are provided an HTML program. Your responsibility is to insert the HTML tags with the appropriate JavaScript statements that will solve the problem discussed below, and to comment the html file with the requested information per the requirements. The problem description and HTML program provided are slightly different from Assignment. Be sure to start fresh.
Problem to solve:
The Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows:
• If a customer purchases 0 books, they earn 0 points
• If a customer purchases 1 book, they earn 4 points
• If a customer purchases 2 books, they earn 8 points
• If a customer purchases 3 books, they earn 16 points
• If a customer purchases more than 3 books, they earn an additional 7 points on top of the 16 points for each book above 3.
Serendipity Booksellers also awards points based on the dollar value spent on non-book merchandise. Four points are awarded for every $10 spent. Partial awards are not provided. For example, 4 points will be awarded for spending $10.00 up to $10.99. No points are awarded for less than $10.
Preferred Customers receive a bonus of double award points.
The Serendipity Booksellers website needs to be updated to ask the customer to enter the number of books purchased last month, the dollars spent on non-book merchandise, confirm if they are a Preferred Customer, and then calculate and display the number of award points earned.
Requirements:
For this assignment;
1. Your program will calculate the award points as described above.
2. You will generate HTML comments to add your name, section and TA name. Each on a separate line within the
tags. This will (should) NOT be visible in the document on the web browser).
3. Utilize a