1700471704
return”工作:”+this.job+”\t”;
1700471705
1700471706
}
1700471707
1700471708
}
1700471709
1700471710
每个实现类都必须实现getOtherInfo信息,通过它获得用户个性信息,我们再来看管理阶层,如代码清单25-3所示。
1700471711
1700471712
代码清单25-3 管理阶层
1700471713
1700471714
public class Manager extends Employee{
1700471715
1700471716
//这类人物的职责非常明确:业绩
1700471717
1700471718
private String performance;
1700471719
1700471720
public String getPerformance(){
1700471721
1700471722
return performance;
1700471723
1700471724
}
1700471725
1700471726
public void setPerformance(String performance){
1700471727
1700471728
this.performance=performance;
1700471729
1700471730
}
1700471731
1700471732
protected String getOtherInfo(){
1700471733
1700471734
return”业绩:”+this.performance+”\t”;
1700471735
1700471736
}
1700471737
1700471738
}
1700471739
1700471740
Performance这个单词在技术人员的眼里就代表性能,在实际商务英语中可以有Sales Performance(销售业绩)、performance evaluation(业绩评估)等。系统的框架都已经具备了,那我们来模拟一下这个过程,如代码清单25-4所示。
1700471741
1700471742
代码清单25-4 场景类
1700471743
1700471744
public class Client{
1700471745
1700471746
public static void main(String[]args){
1700471747
1700471748
for(Employee emp:mockEmployee()){
1700471749
1700471750
emp.report();
1700471751
1700471752
}
1700471753
[
上一页 ]
[ :1.700471704e+09 ]
[
下一页 ]