Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 (4) 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 tag

4. You will then add the HTML tags with the proper JavaScript code to produce: a. A textbox to solicit the number of books purchased b. A textbox to solicit the dollars of non-book merchandise c. Grouped radio buttons to determine Preferred Customer membership d. A button to calculate the number of points awarded e. A readonly textbox to display the result the calculation

5. Utilize JavaScript comments to explain the steps you are preforming within your code. A JavaScript comments form is: /* Place your comment between the stars */ 2

6. Variable names should be descriptive. For example, if a program is calculating the total charge for a bill at a restaurant, it may have a variable named tipAmount.

7. Utilize at least one if/else statement. Consider using the if/else in determining the bonus points.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions