public boolean equals(Object obj)
  {

    // check if obj is a type of BultItem

    if (obj instanceof BulkItem)
      {
        BulkItem otherBulkItem = (BulkItem) obj;
        // check to see if fields match
        if (this.food.equals(otherBulkItem.food)
            && this.unit.equals(otherBulkItem.unit)
            && this.amount == otherBulkItem.amount
            && this.getPrice() == otherBulkItem.getPrice()
            && this.weight.equals(otherBulkItem.weight))
          {
            return true;
          } //if fields match
      }// if obj is an instance of BulkItem

    return false;
  } //equals(Object obj)