@Override
    public VendItem dispense(String itemType) {

        VendItem sodaCan = null;  // null object pattern

        SodaCan item = sodaCanMap.get(itemType);      // Retrive element from the Map and look at the count of items.
         if (item == null)
         {
             transactionMessage = "Invalid Entry";    //never gets here but good to have this
             return sodaCan;
         }

        int itemCount = item.getItemCount();

        if (processBalance.hasSufficientBalance(item.getItemPrice()))
        {
             if (itemCount > 0)
             {
                processBalance.removeItemValue(item.getItemPrice());  //update the balance
                item.setItemCount(itemCount - 1);  // Decrease the count
                updateItemInventory(item);         // Constant Time
                transactionMessage = item.getItemName() + " Successfully Dispensed";
                return item;
              }
              else
             {
               transactionMessage = OUT_OF_STOCK_MESSAGE;
             }
        } else {
                transactionMessage = NOT_ENOUGH_BALANCE;
        }
        return sodaCan;
    }