// methods public override bool Equals(object other) { if (!(other is Buyable)) { return(false); } Buyable b = (Buyable)other; return(prod.Equals(b.prod) && amount == b.amount && leftInStock == b.leftInStock); }
public Buyable(Buyable other) { prod = other.prod; amount = other.amount; leftInStock = other.leftInStock; }