// A simple Box class with operators.
//By DreamVB 23:44 22/11/2016

#include <iostream>

using namespace std;
using std::cout;
using std::endl;

class CBox{

private:
	double bLength;
	double bWidth;
	double bHeight;
public:
	explicit CBox(double Length = 1.0, double Width = 1.0, double Height = 1.0){
		this->bLength = Length;
		this->bWidth = Width;
		this->bHeight = Height;
	}

	double Volume() const{
		return this->bLength*this->bWidth*this->bHeight;
	}

	bool operator<(const CBox& thebox) const{
		return this->Volume() < thebox.Volume();
	}

	bool operator>(const double value) const{
		return this->Volume() > value;
	}

	bool operator<(const double value) const{
		return this->Volume() < value;
	}

	bool operator>(const CBox& thebox) const{
		return this->Volume() > thebox.Volume();
	}

	bool operator==(const CBox& thebox) const{
		return this->Volume() == thebox.Volume();
	}

	bool operator==(const double value) const{
		return this->Volume() == value;
	}

};

int main(int argc, char *argv[]){
	CBox BoxA(4.0, 2.0, 1.0);
	CBox BoxB(1.2, 2.3, 2.3);

	cout << "BoxA Volume : " << BoxA.Volume() << endl;
	cout << "BoxB Volume : " << BoxB.Volume() << endl;
	cout << "BoxA > BoxB : " << (BoxA > BoxB) << endl;

	//Check for equal
	if (BoxA == BoxB){
		cout << "BoxA = BoxB : True";
	}
	else{
		cout << "BoxA = BoxB : False";
	}
	cout << endl;
	system("pause");
	return 0;
}