Class InventoryManagementPage

java.lang.Object
Common.UserInterface
UI.InventoryPages.InventoryManagementPage

public class InventoryManagementPage extends UserInterface
The InventoryManagementPage class provides functionality for managing the inventory of medicines. It extends UserInterface and interacts with the InventoryManager to perform operations such as viewing, adding, updating, and removing medicines.
  • Constructor Details

    • InventoryManagementPage

      public InventoryManagementPage(InventoryManager inventoryManager)
      Constructs an InventoryManagementPage with the specified InventoryManager instance.
      Parameters:
      inventoryManager - the manager used to handle inventory operations
  • Method Details

    • displayOptions

      public void displayOptions()
      Displays options for managing the inventory and handles user input.
    • handleViewInventory

      public void handleViewInventory()
      Displays all items in the inventory.
    • handleAddMedicine

      public void handleAddMedicine()
      Prompts the user to add a new medicine to the inventory.
    • handleRemoveMedicine

      public void handleRemoveMedicine()
      Prompts the user to remove a medicine from the inventory.
    • handleUpdateStock

      public void handleUpdateStock()
      Allows updating of stock levels for medicines in the inventory.
    • handleAddStock

      public void handleAddStock(String medicine)
      Prompts the user to add stock for a specified medicine.
      Parameters:
      medicine - the name of the medicine for which stock is being added
    • handleRemoveStock

      public void handleRemoveStock(String medicine)
      Prompts the user to remove stock from a specified medicine.
      Parameters:
      medicine - the name of the medicine from which stock is being removed
    • handleEditStock

      public void handleEditStock(String medicine)
      Prompts the user to change the stock value of a specified medicine.
      Parameters:
      medicine - the name of the medicine whose stock value is being changed
    • handleUpdateAlertLevel

      public void handleUpdateAlertLevel(String medicine)
      Prompts the user to update the alert level for a specified medicine.
      Parameters:
      medicine - the name of the medicine whose alert level is being updated