Class MenuItem

java.lang.Object
csce331.group13.project2.models.MenuItem

public class MenuItem extends Object
Represents a menu item in the restaurant system. Menu items are categorized as Combo, Entree, Side, Drink, or AddOn.
Author:
Varish Kongara
  • Constructor Details

    • MenuItem

      public MenuItem()
      Default constructor for MenuItem.
    • MenuItem

      public MenuItem(UUID menuItemId, String name, BigDecimal cost, String category, boolean isActive)
      Constructs a MenuItem with all fields specified.
      Parameters:
      menuItemId - The unique identifier for the menu item.
      name - The name of the menu item.
      cost - The price of the menu item.
      category - The category (Combo, Entree, Side, Drink, AddOn).
      isActive - Whether the item is currently available on the menu.
    • MenuItem

      public MenuItem(String name, BigDecimal cost, String category, boolean isActive)
      Constructs a MenuItem with a newly generated UUID.
      Parameters:
      name - The name of the menu item.
      cost - The price of the menu item.
      category - The category (Combo, Entree, Side, Drink, AddOn).
      isActive - Whether the item is currently available on the menu.
  • Method Details

    • getMenuItemId

      public UUID getMenuItemId()
      Gets the menu item's unique identifier.
      Returns:
      The menu item ID.
    • setMenuItemId

      public void setMenuItemId(UUID menuItemId)
      Sets the menu item's unique identifier.
      Parameters:
      menuItemId - The new menu item ID.
    • getName

      public String getName()
      Gets the menu item's name.
      Returns:
      The item name.
    • setName

      public void setName(String name)
      Sets the menu item's name.
      Parameters:
      name - The new item name.
    • getCost

      public BigDecimal getCost()
      Gets the menu item's price.
      Returns:
      The item cost.
    • setCost

      public void setCost(BigDecimal cost)
      Sets the menu item's price.
      Parameters:
      cost - The new item cost.
    • getCategory

      public String getCategory()
      Gets the menu item's category.
      Returns:
      The category (Combo, Entree, Side, Drink, AddOn).
    • setCategory

      public void setCategory(String category)
      Sets the menu item's category.
      Parameters:
      category - The new category.
    • isActive

      public boolean isActive()
      Checks if the menu item is currently active.
      Returns:
      true if the item is active; false otherwise.
    • setActive

      public void setActive(boolean active)
      Sets the menu item's active status.
      Parameters:
      active - The new active status.
    • toString

      public String toString()
      Overrides:
      toString in class Object