Code Monkey home page Code Monkey logo

pizza-parlor's Introduction

Pizza Parlor

By: Katie Pundt

A website for a fictional pizza company. Created to demonstrate understanding of JavaScript constructors and prototypes.

Technologies Used

  • HTML
  • CSS
  • Bootstrap
  • JavaScript
  • jQuery
  • GitHub repositories
  • GitHub Pages

Description

The website will allow users to choose the size of their pizza as well as one or more toppings and display the final cost of the pizza.

Tests

Describe: Pizza()

Test: It will return a Pizza object with properties for size and toppings.
Code: let newPizza = Pizza("m", ["olives", "mushrooms"], ["pepperoni"]);
Expected Output:
  Pizza {
    size: "m"
    veg toppings: ["olives", "mushrooms"]
    meat toppings: ["pepperoni"]
  }
Describe: Pizza.prototype.addVegTopping

Test: It will add a new topping to the veggie toppings array.
Code: 
  newPizza.addVegTopping("mushrooms");
  newPizza;
Expected Output:
  Pizza {
    size: "m"
    veg toppings: ['mushrooms']
    meat toppings: []
  }
Describe: Pizza.prototype.addMeatTopping

Test: It will add a new topping to the meat toppings array.
Code: 
  newPizza.addMeatTopping("pepperoni");
  newPizza;
Expected Output:
  Pizza {
    size: "m"
    veg toppings: []
    meat toppings: ['pepperoni']
  }
Describe: Pizza.prototype.getPrice

Test: It will determine the price of the pizza, based on size.
Code: 
  let newPizza = new Pizza("m");
  newPizza.getPrice();
Expected Output: 18

Test: It will determine the price of the pizza, based on size and toppings.
Code: 
  let newPizza = new Pizza("m", ['mushrooms'])
  newPizza.getPrice();
Expected Output: 19

Test: It will determine the price of the pizza, based on size and toppings.
Code: 
  let newPizza = new Pizza("m", ['mushrooms'], ['pepperoni'])
  newPizza.getPrice();
Expected Output: 21

GitHub Pages

View the project here: https://kpundt93.github.io/pizza-parlor/

Setup/Installation Requirements

  • Navigate to https://github.com/kpundt93/pizza-parlor
  • Click on the green "Code" button and copy the repository URL or click on the copy button
  • Open the terminal on your desktop
  • Once in the terminal, use it to navigate to your desktop folder
  • Once inside your desktop folder, use the command git clone https://github.com/kpundt93/pizza-parlor.git
  • After cloning the project, navigate into it using the command cd pizza-parlor
  • Use the command git remote to confirm the creation of the new local repository
  • Open the project with the code editor of your choice

Known Bugs

  • No known bugs

Contact Information

Katie Pundt, [email protected]

License

MIT License: https://opensource.org/licenses/MIT

Copyright (c) 2021 Katie Pundt

pizza-parlor's People

Contributors

kpundt93 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.