Exemplo n.º 1
0
 public override bool Equals(System.Object otherFlight)
 {
     if (!(otherFlight is Flight))
     {
         return(false);
     }
     else
     {
         Flight newFlight         = (Flight)otherFlight;
         bool   idEquality        = this.GetId() == newFlight.GetId();
         bool   flightNumEquality = this.GetFlightNum() == newFlight.GetFlightNum();
         bool   statusEquality    = this.GetStatus() == newFlight.GetStatus();
         bool   timeEquality      = this.GetTime() == newFlight.GetTime();
         return(idEquality && flightNumEquality && statusEquality && timeEquality);
     }
 }