**By Vichitra Pool (Note) on August 26th, 2016
Create a website for a pizza company where a user can choose can choose one or more individual toppings (cheese, pepperoni, bacon, cheese, etc) or different type of specialty pizza and a size to order a pizza and see the final cost.
- Allow the user to choose toppings and size for the pizza they'd like to order.
- Create a pizza object constructor with properties for toppings and size.
- Create a prototype method for the cost of a pizza depending on the selections chosen. Use your own formula for this.
Behavior | input | output |
---|---|---|
Allow user to input name in uppercase letters, the output will be uppercase | ADAM | ADAM |
Allow user to input name in lowercase letters, the output will be uppercase | adam | ADAM |
Do not allow user to input any number | 1 | Please do not enter number! |
If user forgot to enter their name or/and address | "DON'T FORGET TO ENTER YOUR NAME" | |
If user forgot to enter address | "PLEASE ENTER YOUR INFORMATION CORRECTLY" | |
If none of the pizza's choices are selected | "PLEASE SELECT PIZZA" | |
When user select the type of specialty pizza, the price will be added $8.00 | Thai pizza | $8.00 |
When user select the size of pizza, it will add to base price depending on pizza's size | 10" Small | $12.00 |
When user select the size of pizza, it will add to base price depending on pizza's size | 14" Medium | $15.00 |
When user select the size of pizza, it will add to base price depending on pizza's size | 18" Large | $18.00 |
When user select pizza's topping, the price of $1.00 will be added for each topping | pepperoni | add $1.00 |
When user choose the quantity of pizza, the total price will show | 1 | Total $12.00 |
- Copy Talayruk.github.io/Y-not-Pizza to web browser or click here to open.
- Open Y not Pizza! webpage.
Please contact the authors if you have any questions or comments.
HTML, CSS, CASCADING, BOOTSTRAP, JAVASCRIPT, JQUERY, JS: ARRAY & LOOPING, JS: Objectives, JS: Constructor & Prototype
MIT Creative Commons
Copyright (c) 2016 Vichitra Pool at Epicodus