1700471613
1700471614
//性别很重要
1700471615
1700471616
private int sex;
1700471617
1700471618
//以下是简单的getter/setter
1700471619
1700471620
public String getName(){
1700471621
1700471622
return name;
1700471623
1700471624
}
1700471625
1700471626
public void setName(String name){
1700471627
1700471628
this.name=name;
1700471629
1700471630
}
1700471631
1700471632
public int getSalary(){
1700471633
1700471634
return salary;
1700471635
1700471636
}
1700471637
1700471638
public void setSalary(int salary){
1700471639
1700471640
this.salary=salary;
1700471641
1700471642
}
1700471643
1700471644
public int getSex(){
1700471645
1700471646
return sex;
1700471647
1700471648
}
1700471649
1700471650
public void setSex(int sex){
1700471651
1700471652
this.sex=sex;
1700471653
1700471654
}
1700471655
1700471656
//打印出员工的信息
1700471657
1700471658
public final void report(){
1700471659
1700471660
String info=“姓名:”+this.name+”\t”;
1700471661
1700471662
info=info+“性别:”+(this.sex==FEMALE?“女”:“男”)+”\t”;
[
上一页 ]
[ :1.700471613e+09 ]
[
下一页 ]