#include<iostream>
using namespace std;
class Cube
{
public:
// 设置 A
void setA(int a)
{
m_A=1 ;
}
// 获取 A
int getA(){
return m_A ;
}
void setB(int b){
m_B =1 ;
}
int getB(){
return m_B;
}
void setC(int c){
m_C=1 ;
}
int getC(){
return m_C;
}
// 获取立方体的面积
int calculateS()
{
return 2*m_A*m_B+2*m_A*m_C+2*m_B*m_C ;
}
// 获取立方体体积
int calculateV()
{
return m_A*m_B*m_C ;
}
private:
int m_A;
int m_B;
int m_C;
};
int main(){
Cube c1;
c1.setA(10) ;
c1.setB(10) ;
c1.setC(10) ;
cout<<"c1的面积为:"<<c1.calculateS()<<endl;
cout<<"c1的体积为:"<<c1.calculateV()<<endl;
system("pause");
return 0 ;
}