// A simple class 3
// Date 21:50 31/10/2016
// By Ben a.k.a DreamVB

#include <iostream>

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

class CBox{
	public:
		double m_length = 0;
		double m_width = 0;
		double m_height = 0;

		//Default constructor
		CBox(){
			m_width = m_height = m_length = 2.5;
		}

		CBox(double length, double width, double height){
			m_length = length;
			m_width = width;
			m_height = height;
		}

		double Volume(){
			return m_length*m_width*m_height;
		}

		int BoxCompare(CBox& otherbox){
			if (this->Volume() > otherbox.Volume()){
				return 1;
			}
			else if (this->Volume() < otherbox.Volume()){
				return -1;
			}
			else{
				return 0;
			}
		}
};

int main(int argc, char *argv[]){
	CBox box1(2.3, 2.3, 6.3);
	CBox box2(3, 2.4, 12.8);

	cout << "CBox1" << endl;
	cout << "Length  : " << box1.m_length << endl;
	cout << "Width   : " << box1.m_width << endl;
	cout << "Height  : " << box1.m_height << endl;
	cout << "Volume  : " << box1.Volume() << endl;

	cout << endl << "CBox2" << endl;
	cout << "Length  : " << box2.m_length << endl;
	cout << "Width   : " << box2.m_width << endl;
	cout << "Height  : " << box2.m_height << endl;
	cout << "Volume  : " << box2.Volume() << endl;
	cout << endl;

	switch (box1.BoxCompare(box2)){
		case 0:
			cout << "Both box's volumes are the same." << endl;
			break;
		case 1:
			cout << "Box1's volume is more than box2's volume." << endl;
			break;
		case -1:
			cout << "Box2's volume is more than box1's volume." << endl;
			break;
	}

	system("pause");
	return 0;
}
