/* Name: <= (overload) Function: Checks if Student is less than or equal to Student s Parameters: s (Student) Other Student being compared Returns: (bool) true if Student is less than or equal to Student s */ bool Student::operator<=(Student s) { if (mLastName == s.GetLastName()) { return (mFirstName <= s.GetFirstName()); } return (mLastName <= s.GetLastName()); }
/* Name: == (overload) Function: Checks if Student is equal to Student s Parameters: s (Student) Other Student being compared Returns: (bool) true if Student is equal to Student s */ bool Student::operator==(Student s) { return (mFirstName == s.GetFirstName() && mLastName == s.GetLastName()); }