主函数为:
int main( )
{
Box box1; //没有给实参
cout<<"The volume of box1 is "<<box1.volume( )<<endl;
Box box2(15); //只给定一个实参
cout<<"The volume of box2 is "<<box2.volume( )<<endl;
Box box3(15,30); //只给定2个实参
cout<<"The volume of box3 is "<<box3.volume( )<<endl;
Box box4(15,30,20); //给定3个实参
cout<<"The volume of box4 is "<<box4.volume( )<<endl;
return 0;
}
按要求实现结果输出
注意:默认时 h=w=len=10
无输入