1700468716
1700468717
//公司每个人都有薪水
1700468718
1700468719
private int salary=0;
1700468720
1700468721
//父节点是谁
1700468722
1700468723
private Corp parent=null;
1700468724
1700468725
public Corp(String_name,String_position,int_salary){
1700468726
1700468727
this.name=_name;
1700468728
1700468729
this.position=_position;
1700468730
1700468731
this.salary=_salary;
1700468732
1700468733
}
1700468734
1700468735
//获得员工信息
1700468736
1700468737
public String getInfo(){
1700468738
1700468739
String info=””;
1700468740
1700468741
info=“姓名:”+this.name;
1700468742
1700468743
info=info+”\t职位:”+this.position;
1700468744
1700468745
info=info+”\t薪水:”+this.salary;
1700468746
1700468747
return info;
1700468748
1700468749
}
1700468750
1700468751
//设置父节点
1700468752
1700468753
protected void setParent(Corp_parent){
1700468754
1700468755
this.parent=_parent;
1700468756
1700468757
}
1700468758
1700468759
//得到父节点
1700468760
1700468761
public Corp getParent(){
1700468762
1700468763
return this.parent;
1700468764
1700468765
}
[
上一页 ]
[ :1.700468716e+09 ]
[
下一页 ]