qweewq22
پنج شنبه 08 اردیبهشت 1390, 16:54 عصر
سلام خدمت اساتید گرامی
من یک تیکه کد دارم ولی نمی دونم چیکار کرده و یه لطفی بکنین در مورد قسمت های *** یه توضیح کاملی بدین _ مرسی
class box{
private double width,height,depth;
***box(box ob){
width=ob.width;
height=ob.height;
depth=ob.depth;
}
***box(double w,double h,double d){
width=w;
height=h;
depth=d;
}
***box(){
width=-1; //use -1 to indicate
height=-1; //an unitialized
depth=-1; // box
}
***box(double len){
width=height=depth=len;
}
double volume(){
return width*height*depth;
}
}
class box2 extends box{
double weight;
***box2(box2 ob){
super(ob);
weight=ob.weight;
}
**8box2(double w,double h,double d,double m){
***super(w,h,d);
weight=m;
}
***box2(){
***super();
weight=-1;
}
***box2(double m,double len){
***super(len);
weight=m;
}
}
من یک تیکه کد دارم ولی نمی دونم چیکار کرده و یه لطفی بکنین در مورد قسمت های *** یه توضیح کاملی بدین _ مرسی
class box{
private double width,height,depth;
***box(box ob){
width=ob.width;
height=ob.height;
depth=ob.depth;
}
***box(double w,double h,double d){
width=w;
height=h;
depth=d;
}
***box(){
width=-1; //use -1 to indicate
height=-1; //an unitialized
depth=-1; // box
}
***box(double len){
width=height=depth=len;
}
double volume(){
return width*height*depth;
}
}
class box2 extends box{
double weight;
***box2(box2 ob){
super(ob);
weight=ob.weight;
}
**8box2(double w,double h,double d,double m){
***super(w,h,d);
weight=m;
}
***box2(){
***super();
weight=-1;
}
***box2(double m,double len){
***super(len);
weight=m;
}
}