Pizza Parlor

💻 Learning project for practicing Constructors and prototypes in JavaScript 12/08/2023

By Daniya Yelemessova

js

screen of the program

-----------------------------------------------------

🛠️ Technologies used:

  • HTML
  • CSS
  • JavaScript
  • Visual Studio Code
  • GIT
  • Test-Driven Development

-----------------------------------------------------

🚥 Installation and USAGE

To set up and use this project locally for development or testing purposes, follow these steps:

To get started, you'll need to clone this repository to your local machine. Open your terminal or command prompt and use the following command to do so:

  1. git clone https://github.com/DaniyaYelemessova/Pizza-Parlor.git
  2. Navigate to the Project Directory, using cd
  3. Open the project using code .
  4. Customize your pizza:
    • Choose your desired toppings by checking the checkboxes (meatballs, pepperoni, artichoke, or anchovy)
    • Select the pizza size from the available options
  5. Click the "Order" button to see the calculated final cost for your customized pizza.
  6. Enjoy your personalized pizza experience with Pizza Parlor!

⌨️ Tests

Describe: Pizza()

Test: "It should return a Pizza object with two properties for toppings and size"
Code: const myPizza = new Pizza(["anchovies", "pineapple"], "medium");
Expected Output: Pizza { toppings: ["anchovies", "pineapple"], size: "medium" }

Describe: Pizza.prototype.finalPrice

Test: "it should calculate final price correctly for pepperoni topping"
Code: const myPizza = new Pizza("pepperoni", "medium");
myPizza.finalPrice()
Expected Output: 37 (base price(30) + topping cost)

Test: "it should calculate final price correctly for pizza without topping"
Code: const myPizza = new Pizza("no topping", "medium");
myPizza.finalPrice()
Expected Output: 30 (base price);

Test: "it should calculate final price correctly for pizza with anchovy topping"
Code: const myPizza = new Pizza("anchovy", "medium");
myPizza.finalPrice()
Expected Output: 34 (base price + anchovy topping);

Test: "it should calculate final price correctly for pizza with artichoke topping"
Code: const myPizza = new Pizza("artichoke", "medium");
myPizza.finalPrice()
Expected Output: 33 (base price + artichoke topping)

Test: "it should calculate final price correctly for medium size pizza"
Code: const myPizza = new Pizza("no topping", "medium");
myPizza.finalPrice()
Expected Output: 35 (base price + medium size)

Test: "it should calculate final price correctly for medium size pizza and topping"
Code: const myPizza = new Pizza("pepperoni", "medium");
myPizza.finalPrice()
Expected Output: 42 (base price + pepperoni topping + medium size)

Test: "it should calculate final price correctly for medium size pizza and two different toppings"
Code: const myPizza = new Pizza(["pepperoni", "artichoke"], "medium");
myPizza.finalPrice()
Expected Output: 45 (base price + pepperoni topping + artichoke topping  + medium size)

🤔 Description:

Pizza Parlor

"Pizza Parlor" is a web application that enables users to customize their pizza orders. Users can select individual toppings, such as meatballs, pepperoni, artichoke, and anchovy, along with choosing the size of the pizza. The application utilizes a pizza object constructor with properties for toppings and size. It includes a prototype method that calculates the final cost based on the user's selections. This project provides a straightforward and interactive platform for pizza customization and order placement.

-----------------------------------------------------

github icon Link to site on Github Pages:

-----------------------------------------------------

Known Issues

-no known issues at this time.

📬 Contact Information

For any questions LinkedIn

📘 License and copyright:

© Daniya Yelemessova, 2023
⚖️ License: MIT