设计Bird(鸟类)、Fish(鱼类),都继承自Animal(动物)类,实现其方法printInfo(),输出信息。
代码如下:
Animal类(父)
public class Animal {
private String form;
public int age;
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getForm() {
return form;
}
public void setForm