public override bool Equals(System.Object otherCheckout) { if (!(otherCheckout is Checkout)) { return(false); } else { Checkout newCheckout = (Checkout)otherCheckout; bool idEquality = (this.GetId() == newCheckout.GetId()); bool copyIdEquality = (this.GetCopyId() == newCheckout.GetCopyId()); bool patronIdEquality = (this.GetPatronId() == newCheckout.GetPatronId()); bool dueEquality = (this.GetDueDate() == newCheckout.GetDueDate()); bool checkInEquality = (this.GetCheckInStatus() == newCheckout.GetCheckInStatus()); return(idEquality && copyIdEquality && patronIdEquality && dueEquality && checkInEquality); } }