#include<iostream>
using namespace std;

class Cube
{
public:
void setL(int L)
{
m_L = L;
}
int getL()
{
return m_L;
}

void setH(int H)
{
m_H = H;
}
int getH()
{
return m_H;
}

void setW(int W)
{
m_W = W;
}
int getW()
{
return m_W;
}
int calculateS()
{
return 2*m_L*m_H+2*m_L*m_W+2*m_W*m_H;
}
int calculateV()
{
return m_L*m_H*m_W;
}
bool isSameByClass(Cube &c)
{
if (m_H == c.getH() && m_L == c.getL() && m_W == c.getW())
return true;
else
return false;
}
private:
int m_L;
int m_H;
int m_W;
};

bool isSame(Cube &c1, Cube &c2)
{
if (c1.getH() == c2.getH() && c1.getL() == c2.getL() && c1.getW() == c2.getW())
return true;
else
return false;
}
int main()
{
Cube c1;
c1.setL(10);
c1.setH(20);
c1.setW(5);
//cout << "立方体的面积是:" << c1.calculateS() << endl;
//cout << "立方体的体积是:" << c1.calculateV() << endl;
Cube c2;
c2.setL(10);
c2.setH(20);
c2.setW(3);
//bool ret = isSame(c1, c2);
//if (ret)
// cout << "两个立方体大小相同" << endl;
//else
// cout << "两个立方体大小不相同" << endl;
bool ret = c1.isSameByClass(c2);
if (ret)
cout << "两个立方体大小相同" << endl;
else
cout << "两个立方体大小不相同" << endl;
system("pause");
return 0;
}