public class Cuboid extends Rectangle{
double height;
private double length,width;
public Cuboid(double length,double width,double height){
this.length=length;
this.width=width;
this.height=height;
}
public double volume(){
return length*width*height;
}
public static void main(String[] args) {
Cuboid c1=new Cuboid(10,5,2);
System.out.println(" 长方体 c1 的体积为 "+c1.volume());
}
}