Beispiel #1
0
bool Stack<T>::operator!=(const StackInterface<T>& rhs) const {

if(m_size != rhs.size()) {
return(true);
}

else {
return(false);
}

}
bool Stack<T>::operator>(const StackInterface<T>& rhs)const
{
	return this->m_size>rhs.size();
}
Beispiel #3
0
bool Stack<T>::operator>=(const StackInterface<T>& rhs) const{

	return(size()>=(rhs.size()));
	//note: we can't use m_size becuase it is a member of the child class.  Instead, we use the result of the size method, which must exist in all child classes.
}
Beispiel #4
0
bool Stack<T>::operator!=(const StackInterface<T>& rhs)const{
	return(size()!=(rhs.size()));
}
Beispiel #5
0
bool Stack<T>::operator>(const StackInterface<T>& rhs) const{

	return(size()>(rhs.size()));
//note - this is ok as an argument, because we know all stackinterfaces have a size regardless of the data type.	
}