A website for ordering pizza with a choice of toppings and size, returns final cost of pizza. Created for Epicodus Front End Development course.
Create Javascript objects with constructors and prototypes.
Specification | Input | Output |
---|---|---|
Customer can select size of pizza: small, medium, large | Small | Small |
Customer can select toppings for pizza: pepperoni, mushrooms, olives | Pepperoni, olives | Pepperoni, olives |
System will calculate total price for pizza | Small: $8, Pepperoni: $3, Olives: $2 | Pizza: $13 |
Specification | Input | Output |
---|---|---|
System will offer three sizes: small, medium, large | ||
Each pizza size has a base price | Small: $8, Medium: $12, Large: $16 | Small: $8, Medium: $12, Large: $16 |
Each topping has a price | Pepperoni: $3, Mushrooms: $2, Olives: $2 | Pepperoni: $3, Mushrooms: $2, Olives: $2 |
Customer can select size of pizza | Small | Small |
System will store the base price of the pizza | Small | $8 |
Customer can select one topping | Pepperoni | Pepperoni |
Customer can select two toppings for pizza | Pepperoni, olives | Pepperoni, olives |
Customer can select three toppings for pizza | Pepperoni, olives, mushrooms | Pepperoni, olives, mushrooms |
System will add price of each topping to base price | Small pizza + Pepperoni | $8 + $3 = $11 |
. | Small pizza + Pepperoni + Olives | $11 + $2 = $13 |
Customer can order final pizza | "Order pizza" | "Small pizza with pepperoni, olives, $13" |
System will display final price of pizza when order is completed | Order completed: Small pizza + Pepperoni + Olives | $13 |
System will display base price of pizza when size is selected | Small | $8 |
- Style page with CSS
- Display running total as toppings are added to or removed from pizza order
- Order multiple pizzas with different toppings
- View at https://tracyre.github.io/order-pizza/
- Clone from https://github.com/TracyRe/
- Open in browser of your choice
- Edit files as desired
- None known
N/A
HTML, CSS with Bootstrap, Javascript with jQuery
N/A
Copyright (c) 2019 Tracy Reith