9.3 9.2Ļϣ캯һ޲һв
#include <iostream>
using namespace std;
class Box
{public:
Box( );                                    //һ޲εĹ캯
Box(int h,int w,int len):height(h),width(w),length(len){ }
//һвεĹ캯òĳʼݳԱʼ
int volume( );
private:
int height;
int width;
int length;
};
BoxBox( )                                   //һ޲εĹ캯
{height=10;
width=10;
length=10;
}

int Boxvolume( )
{return(height*width*length);
}

int main( )
{
Box box1;                                    //box1,ָʵ
cout<<The volume of box1 is <<box1.volume( )<<endl;
Box box2(15,30,25);                          //box2,ָ3ʵ
cout<<The volume of box2 is <<box2.volume( )<<endl;
return 0; 
}