Ejemplo n.º 1
0
 public override bool Equals(System.Object otherCourse)
 {
     if (!(otherCourse is Course))
     {
         return(false);
     }
     else
     {
         Course newCourse           = (Course)otherCourse;
         bool   descriptionEquality = (this.GetName() == newCourse.GetName());
         return(descriptionEquality);
     }
 }
Ejemplo n.º 2
0
 public override bool Equals(System.Object otherCourse)
 {
     if (!(otherCourse is Course))
     {
         return(false);
     }
     else
     {
         Course newCourse           = (Course)otherCourse;
         bool   idEquality          = this.GetId() == newCourse.GetId();
         bool   descriptionEquality = this.GetName() == newCourse.GetName();
         bool   NumberEquality      = this.GetNumber() == newCourse.GetNumber();
         // We no longer compare Students' CourseIds in a categoryEquality bool here.
         return(idEquality && descriptionEquality && NumberEquality);
     }
 }