62,628
社区成员
发帖
与我相关
我的任务
分享/**
* 人
*/
class Person {
private String name;
private int age;
public Person() {
name = "";
age = 0;
}
public String getName() {
return name;
}
}
/**
* 学生
*/
class Student extends Person {
private int score;
public Student() {
super();
score = 0;
}
public int getScore() {
return score;
}
}
/**
* 暑假工
*/
class SummerWork extends Student {
private int salary;
public SummerWork() {
super();
salary = 0;
}
public int getSalary() {
return salary;
}
}
不知道多实现你怎么理解的?