class Shape{
String name;
double length;
double width;
double hight;
public Shape(String name,double length,double width,double hight){
System.out.println("图形的形状为:"+name+" , 长度为:"+length+" , 宽度为:"+width+" , 高度为:"+hight);
}
}
public class t62 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Shape s1=new Shape("正方形",100,20,50);
Shape s2=new Shape("正方形",100,20,50);
Shape s3=new Shape("正方形",100,20,50);
Shape s4=new Shape("正方形",100,20,50);
Shape s5=new Shape("正方形",100,20,50);
Shape s6=new Shape("正方形",100,20,50);
}
}
图形的类
最新推荐文章于 2023-01-02 09:45:22 发布