Example #1
0
  /**
   * @param itemCode Item Code of the Food Item whose Nutritional Info is to be displayed return
   *     item - Food Item
   *     <p>This method calls the 'GetFoodItem' method in the VendingMachine class.
   */
  public FoodItem DisplayNutritionalInfo(int itemCode) {
    VendingMachine machine = parentUI.getVendingMachine();
    FoodItem item = machine.GetFoodItem(itemCode); // Call to the method in Vending Machine Class

    return item;
  }