#include <iostream>
using namespace std;

class box{

public:
    box(int a = 0, int b = 0, int c = 0) : h(a), l(b), w(c) {}

    double volume() const { return l*h*w; }

    bool operator > (const box& a) const { return volume() > a.volume(); }

    friend ostream& operator<<(ostream&os, const box& b);

private:
    double h;
    double l;
    double w;

};

ostream& operator<<(ostream& os, const box& b)
{
    return os << b.h << " x " << b.l << " x " << b.w;
}

int main(){

    //Question #2
    box x(1, 2, 3), g;
    box f(7, 8, 120), m(8, 6, 4);


    cout << "Comparing g (" << g << ") and x (" << x << ")\n";

    cout << " g (" << g.volume() << ") ";
    if (g > x)
        cout << "is greater ";
    else
        cout << "is not greater ";
    cout << "than x (" << x.volume() << ")\n";


    cout << "\nComparing m (" << m << ") and f (" << f << ")\n";

    cout << "m (" << m.volume() << ") ";
    if (m > f)
        cout << "is greater " ;
    else
        cout << "is not greater " ;
    cout << "than f (" << f.volume() << ")\n";
}