Epicodus Week 4 - Friday Prompt
- HTML
- CSS
- Bootstrap
- JS
- jQuery
- Github
Create a website for a pizza company where a user can choose one or more individual toppings (cheese, pepperoni, artichoke, anchovy, etc) and a size to order a pizza and see the final cost.
- Constructors and prototypes are used successfully.
- Application works as expected.
- Tests are included for each business logic behavior and code is committed after each test passes.
- Project is in a polished, portfolio-quality state.
- The prompt’s required functionality and baseline project requirements are in place by the deadline.
- git clone repository link, to your local machine.
- requires an internet connection to run (Bootstrap and jQuery are using a CDN)
- open the index.html file in your browser, or run Go Live in VS Code to run the code on your local host.
N/A
Description: Pizza() Constructor Object
Test: Return a Pizza object with two properties for toppings and size
Code: const pizzaOrder = new Pizza(["pepperoni", "black olives"], "large");
Expected Output: Pizza { toppings: ["pepperoni", "black olives"], size: "large" }
Description: selectSize() Pizza prototype
Test: Checks the value of selected size and assigns it to the Pizza constructor size property
Code: pizza.selectSize();
Expected Output: size: small, medium, or large
Description: selectToppings() Pizza prototype
Test: Map through each toppings checkbox input and return it's value into an array
Code: pizza.selectToppings();
Expected Output: toppings: [...]
Description: sizePrice()
Test: Assign a price based on pizza selection price
Code: pizza.sizePrice();
Expected Output: 10, 14, 18
Description: toppingPrice()
Test: Output the cost of each topping based off the length of the toppings array length
Code:
toppingPrice()
pizza.toppingCost
Expected Output: 1-4, depending on how many toppings you choose. Each topping is worth 1 dollar
Description: sumTotal()
Test: Total cost of pizza size and toppings
Code:
pizza.sumTotal();
pizza.totalCost;
Expected Output: size price + number of toppings
- MIT
If you run into any issues or have any concerns, feel free to Contact me: [email protected], or request to make any contributions to my code.
Copyright (c) 5/27/2022 Filmer Tolentino