Esempio n. 1
0
 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     dueDateEquality  = this.GetDueDate() == newCheckout.GetDueDate();
         bool     patronIdEquality = this.GetPatronId() == newCheckout.GetPatronId();
         bool     bookIdEquality   = this.GetBookId() == newCheckout.GetBookId();
         return(idEquality && dueDateEquality && patronIdEquality && bookIdEquality);
     }
 }