public class Teacher extends SchoolMen{//定义一个老师类继承学校职工类
public int number;
public Teacher(){
number=0;
}
public Teacher(String n,int a,int m){
super(n,a);
number=m;
}
public int getNumber(){
return number;
}
public void setNumber(int m){
number=m;
}
public static void main(String[] args){
Teacher p=new Teacher();
p.setNumber(3);
System.out.println("the number is:"+p.number);
}
}