资源简介

北邮 java 作业5 群体对象,李颉老师的课上作业群体对象

资源截图

代码片段和文件信息

package work5;

public class basePlusCommissionEmployee extends CommissionEmployee{
    float baseSalary;
    public basePlusCommissionEmployee(String newfirstNameString newlastNameString newsocialSecurityNumberfloat newgrossSalesfloat newcommissionRatefloat newbaseSalary){
     super(newfirstNamenewlastNamenewsocialSecurityNumbernewgrossSalesnewcommissionRate);
     baseSalary=newbaseSalary;
    }
    float earning(){
     return super.earning()+baseSalary;
    }
    float getbaseSalary(){
     return baseSalary;
    }
    void setbaseSalary(float newbaseSalary){
     baseSalary=newbaseSalary;
    }
    public String toString(){
     return “basePlusCommissionEmployee“+super.toString()+“baseSalary=“+baseSalary;
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         762  2017-12-24 10:34  basePlusCommissionEmployee.java
     文件         941  2017-12-24 10:34  CommissionEmployee.java
     文件         840  2017-12-24 10:34  Employee.java
     文件        6293  2017-12-24 10:34  Factory.java
     文件         730  2017-12-24 10:34  HourlyEmployee.java
     文件         652  2017-12-24 10:34  SalaridEmployee.java

评论

共有 条评论