Class: MenuEntry

MenuEntry


A meal you offer. Data class.

To create a new MenuEntry use the add method in Menu. A higher price is accepted if more ingredients are in a menu. But try to make a meal delicious, because really nobody likes bad tasting food.
Source:
MenuEntry.js

Members


name :String

The name on the menu. Read-only.
Type:
  • String
Source:
MenuEntry.js

ingredients :List

A list of the ingredients in this meal. Read-only.
Type:
Source:
MenuEntry.js

price :Number

The price you charge for this meal. Read-Write.
Type:
  • Number
Source:
MenuEntry.js

Methods


addIngredient(food)

Adds an ingredient to your meal.
Parameters:
Name Type Description
food String The food to add: SALAD, TOMATO, ONION, BREAD, LAMB_MEAT, CHICKEN_MEAT, BEEF_MEAT, CABBAGE, SPICES, GARLIC_SAUCE
Source:
MenuEntry.js

removeIngredient(food)

Removed all ingredients of this type from your meal.
Parameters:
Name Type Description
food String the food to remove: SALAD, TOMATO, ONION, BREAD, LAMB_MEAT, CHICKEN_MEAT, BEEF_MEAT, CABBAGE, SPICES, GARLIC_SAUCE
Source:
MenuEntry.js