- HTML
- CSS
- Markdown
- JavaScript
- Bootstrap
- jQuery
Uses objects to store pizzas you create and add to your order, which you can then view or remove from the order.
- Clone this repository to your local device
- Run index.html in your browser
- Enjoy the lovely CSS
- Or experience the site live on github pages right here!
- Cannot actually order the pizzas yet.
License - MIT
If you run into any problems/bugs feel free to send me an email @mc.casperson@gmail.com with details.
Copyright (c) 2021 Matt C.
Test: "It should return a Pizza object with four properties for Toppings, Size, Sauce, and Crust."
- Code: const myPizza = new Pizza(["canadian bacon", "pineapple", "pepperoncini"], "medium", "garlic parmesan", "stuffed");
- Expected Output: Pizza { toppings: ["canadian bacon", "pineapple", "pepperoncini"], size: "medium", sauce: "garlic parmesan", crust: "stuffed" }
Test: "It should set a price property for the pizza its called on based on the other properties."
- Code: myPizza.pricing();
- Expected Output: Pizza { toppings: ["canadian bacon", "pineapple", "pepperoncini"], size: "medium", sauce: "garlic parmesan", crust: "stuffed", price: 12.75 }
Test: "It should return a PizzaOrder object with a property to store pizzas and an ID to assign pizzas it stores."
- Code: const myOrder = new PizzaOrder();
- Expected Output: PizzaOrder { Pizzas: {}, currentId: 0 }
Test: "It should assign an ID to a pizza and add it to the order."
- Code: myOrder.addPizza(myPizza);
- Expected Output: PizzaOrder { Pizzas: {1: myPizza}, currentId: 1 }
Test: "It should add the price of the pizza to the total price of the order."
- Code: myOrder.addPizza(myPizza);
- Expected Output: PizzaOrder { Pizzas: {1: myPizza}, currentId: 1, totalPrice: 12.75 }
Test: "It should increment the order's currentId by 1 then return the currentId."
- Code: myOrder.assignId();
- Expected Output: 2
Test: "It should take an ID number and return any pizza that matches that ID in the order."
- Code: myOrder.findPizza(1);
- Expected Output: Pizza { toppings: ["canadian bacon", "pineapple", "pepperoncini"], size: "medium", sauce: "garlic parmesan", crust: "stuffed", id: 1 }
Test: "It should take an ID number, remove any pizza matching that ID from the order, and return true if it does."
- Code: myOrder.removePizza(1);
- Expected Output: true
Test: "It should remove the price of the removed pizza from the total price of the order."
- Code: myOrder.removePizza(1);
- Expected Output: PizzaOrder { Pizzas: {}, currentId: 1, totalPrice: 0 }