class Employee{
private String Name;//姓名
private int Id;// 工号
private double Salary;//应得工资
private double RealSalary;//实德工资
private double Tax;//税public String getName(){
return this.Name;}public int getId(){
return this.Id;
}public void setRealSalary(){
this.RealSalartythis.Salary-this.Tax;//
}public double getSalary(){
return this.Salary;}public void setName(String nName){
this.Name=nName;}public void setId(int nId){
this.Id=nId;}public int reportSalary(){}
}//end class Employeeclass SalaryEmployee extends Employee{
public void setSalary(double nSalary){
this.Salary=nSalary;
}
public void payTaxes(){
this.Tax=Salary*10/100;
}
}
class TempEmpolyee extends Employee{
public void setSalary(int hours,double pre){
this.Salary=hours*pre;
}
public void payTaxes(){
this.Tax=Salary*8/100;
}
}}
zh这里是一部分,其他的自己完善