DariaClem / Coffee-Machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coffee-Machine

In this project I tried to reflect the experience of buying a coffee at a vending machine. You have 4 sortiments of coffee, that have different reciepts. If you are vegan or lactose intolerant, you can order your milk based coffee with soy milk. How cool is that! The menu looks like this:

Coffee:

  • $4 espresso
  • $7 latte
  • $6 cappuccino
  • $8 iced coffee

Extras:

  • $0.5 Sugar
  • $1 Milk
  • $1.5 Soy Milk

First, you have to go through an short authentification process (you have to choose if you are a customer or a staff member, because a customer have restricted access on the coffee machine). After that, you have 6 options to choose from:

  • menu: displays the products and its prices
  • buy: you can buy a product:
    • coffee:
      • espresso
      • latte
      • cappuccino
      • iced coffee
    • extras:
      • sugar
      • milk
      • soy milk
  • fill: refills the ingredient stock (only if you are a staff member)
  • take: you take the money the coffee machine earned (only if you are a staff member)
  • remaining: you check how much is left of each product
  • exit: you exit the program

If the coffee machine doesn't have enough resources to make you a coffee, you'll get a warning.

About


Languages

Language:JavaScript 100.0%