teacher

public class Teacher extends Person {

public static int count = 0;
private String tescherId;
private String university;

public Teacher(String name) {
super(name);
count++;
}

public String getTescherId() {
return tescherId;
}
public void setTescherId(String tescherId) {
this.tescherId = tescherId;
}
public String getUnit() {
return university;
}
public void setUnit(String university) {
this.university = university;
}
public void work() {
System.out.println(name + “在教学”);
}

}

上一篇:23种设计模式之工厂方法


下一篇:23种设计模式之建造者模式(Builder)