The owner of 'Cupcakes R Us' is in need of a web application to sell their bakery products via ecommerce. Cupcakes R Us sells cupcakes, cookies, and cakes. They do not have a storefront. Therefore, they need a web site to sell their baked goods.
Scenario:
The owner of 'Cupcakes R Us' is in need of a web application to sell their bakery products via ecommerce. Cupcakes R Us sells cupcakes, cookies, and cakes. They do not have a storefront. Therefore, they need a web site to sell their baked goods.
The user enters their name, state, bakery item and the quantity (by dozen or cake) for as many items they want to purchase.
The
the name can not be blank
the state can only be the three states listed above.
the bakery item must be a valid bakery item from the list above.
the quantity can not <= 0
If the values are invalid, an error message is displayed to the user
Otherwise:
the values for the item and quantity are added to an array of items selected to be purchased.
The program computes the subtotal, and calculates the tax based on the state. The application provides the following information at the bottom of the page : Name of Client (in proper case), State, the list of items selected to be purchased, order subtotal, tax charge, and total.
a. All javaScript code is placed in a file separate from the HTML file
b. All variables and constants names must be descriptive – no single character variable name
c. The bodies of all loops, if statements, and functions are indented
d. Place block comments at the beginning of your page with the following information:
i. Name
ii. Page/Program Description
iii. Last Modified Date
The chart below details their current list of baked goods. All cupcakes and cookies are sold by the dozen only. The cakes are sold individually.
tem |
Size |
Flavors |
Cost |
CupCakes |
Mini |
Chocolate, Vanilla, Butter, Carrot, Red Velvet |
13.00 per dozen |
|
Regular |
|
18.00 per dozen |
|
Large |
|
25.00 per dozen |
Cookies |
Mini |
Choc. Chip, Sugar, Peanut Butter, Oatmeal Raisin, Butterscotch |
15.00 per dozen |
|
Regular |
|
30.00 per dozen |
|
Large |
|
45.00 per dozen |
Cakes |
Mini |
Chocolate, Vanilla, Butter, Carrot, Red Velvet |
21.00 per cake |
|
Regular |
|
35.00 per cake |
|
Large |
|
45.00 per cake |
|
Wedding |
|
250.00 per cake |
Tax by State:
State |
Tax Percentage |
Florida |
7.0 |
Georgia |
6.5 |
Alabama |
6.0 |

Trending now
This is a popular solution!
Step by step
Solved in 3 steps









