Class ShoppingList

java.lang.Object
edu.ntnu.stud.model.ShoppingList

public class ShoppingList extends Object
The ShoppingList class is responsible for managing the user's shopping list.
  • Constructor Details

    • ShoppingList

      public ShoppingList()
  • Method Details

    • updateShoppingList

      public static void updateShoppingList(String recipeName)
      Updates the shopping list by comparing the ingredients in the recipe with the inventory.
      Parameters:
      recipeName - The name of the recipe to update the shopping list with
    • getShoppingList

      public static List<Ingredient> getShoppingList()
      Get the shopping list from shopping_list.json.
      Returns:
      The shopping list
    • clearShoppingList

      public static void clearShoppingList()
      Clears the shopping list by removing all items from the shopping list and shopping_list.json.