#include <iostream>
using namespace std;
class Stu
{
private:
int a;
int b;
public:
Stu():a(0),b(0)
{
}
Stu(int a,int b):a(a),b(b)
{
}
bool operator>(const Stu &R) const;
bool operator>=(const Stu &R) const;
bool operator<=(const Stu &R) const;
bool operator<(const Stu &R) const;
bool operator==(const Stu &R) const;
bool operator!=(const Stu &R) const;
};
bool Stu :: operator>(const Stu &R) const
{
if(a > R.a && b > R.b)
{
return true;
}
return false;
}
bool Stu :: operator>=(const Stu &R) const
{
if(a >= R.a && b >= R.b)
{
return true;
}
return false;
}
bool Stu :: operator<(const Stu &R) const
{
if(a < R.a && b < R.b)
{
return true;
}
return false;
}
bool Stu :: operator<=(const Stu &R) const
{
if(a <= R.a && b <= R.b)
{
return true;
}
return false;
}
bool Stu :: operator==(const Stu &R) const
{
if(a == R.a && b == R.b)
{
return true;
}
return false;
}
bool Stu :: operator!=(const Stu &R) const
{
if(a != R.a || b != R.b)
{
return true;
}
return false;
}
int main()
{
Stu s1(10,10);
Stu s2 = s1;
Stu s3;
if(s2 == s1)
{
cout << "s2 == s1" << endl;
}
if(s3 < s1)
{
cout << "s3 < s1" << endl;
}
return 0;
}