Exemplo n.º 1
0
/*
	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());
}
Exemplo n.º 2
0
/*
	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());
}