摘要: // 图形类Shape package d922B; public class Shape { double getArea(ShapePara x){ return x.getArea(); } double getArea(Rect y) { return y.getA() y.getB(); 阅读全文
posted @ 2016-09-22 19:48 削肾客 阅读(5609) 评论(0) 推荐(0) 编辑
摘要: //接口 ShapePara package d922B; public interface ShapePara { int getArea(); int getCircumference(); } //圆类 package d922B; public class Circle implements 阅读全文
posted @ 2016-09-22 19:46 削肾客 阅读(2855) 评论(0) 推荐(0) 编辑
摘要: //Monkey类 package d922; public class Monkey { Monkey() { } Monkey (String s) { System.out.println(s); } public void speak() { System.out.println("咿呀") 阅读全文
posted @ 2016-09-22 17:53 削肾客 阅读(4552) 评论(0) 推荐(0) 编辑
摘要: //People类 package d922; public class People { protected double height,weight; public void speakHello() { System.out.println("雷好"); } public double get 阅读全文
posted @ 2016-09-22 17:50 削肾客 阅读(1292) 评论(0) 推荐(0) 编辑
摘要: //Instrument类 package d922; public class Instrument { public void play() { System.out.println("弹奏乐器"); } } //Wind类 package d922; public class Wind ext 阅读全文
posted @ 2016-09-22 17:47 削肾客 阅读(179) 评论(0) 推荐(0) 编辑
摘要: ///Animal类 package d922A; public class Animal { private String kind; public String getKind() { System.out.println(kind); return kind; } public void se 阅读全文
posted @ 2016-09-22 17:43 削肾客 阅读(2671) 评论(0) 推荐(0) 编辑
摘要: //矩形父类 package d922A; public class Rect { private double l,w; Rect(double c,double k) { l=c; w=k; } public double s() { return w l; } } ///立方体类 packag 阅读全文
posted @ 2016-09-22 17:40 削肾客 阅读(12595) 评论(0) 推荐(0) 编辑
摘要: //Vehicle类 package d922A; public class Vehicle { private int wheels; private double weight; Vehicle() { weight=1;wheels=4; } Vehicle(int lun, double z 阅读全文
posted @ 2016-09-22 17:37 削肾客 阅读(10150) 评论(0) 推荐(0) 编辑
摘要: //Shape类 package d922A; public class Shape { private double l,s; public double getL() { return l; } public void setL(double l) { this.l = l; } public 阅读全文
posted @ 2016-09-22 17:34 削肾客 阅读(2492) 评论(0) 推荐(0) 编辑