d图片是需求,Drink 的类怎么建立啊,求大神帮我public class Material { private String name; private int pirce; public Material() { } public Material(String name, int pirce) { super(); this.name = name; this.pirce = pirce; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getPirce() { return pirce; } public void setPirce(int pirce) { this.pirce = pirce; } public void add(){ System.out.println(); }}public class MinorMaterial extends Material {
public MinorMaterial() {
}
public MinorMaterial(String name, int pirce) {
super(name, pirce);
}
}
public class MainMaterial extends Material {
public MainMaterial() {
}
public MainMaterial(String name, int pirce) {
super(name, pirce);
}
}
添加回答
举报
0/150
提交
取消