Directions : You are provided an html program, assignment6.html . Your responsibility is to insert the JavaScript statements that will solve the problem discussed below,
Directions: You are provided an html program, assignment6.html. Your responsibility is to insert the
JavaScript statements that will solve the problem discussed below, and to comment the html file with the requested information per the requirements.
For the JavaScript, you will only complete the section inside of the
1
Problem to solve:
The Good Sipping Coffee Shop has a frequent buyer club that awards points to its customers based on the number of coffees purchased each month. The points are awarded as follows:
If a customer purchased no coffees, they earn 0 points
If a customer purchased 1 coffee, they earn 2 points
If a customer purchased 2 coffees, they earn 5 points
If a customer purchased 3 coffees, they earn 9 points
If a customer purchased more than 3 coffees, they earn 9 points plus an additional 2
points for each coffee above 3. Preferred Customers receive a bonus of double award points.
The Good Sipping Coffee Shop website needs to be updated to ask the customer to enter the number of coffees purchased last month, confirm if they are a Preferred Customer, and then calculate and display the number of award points earned.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started