//子类
package demo06;
public class BasePlusSalesEmployee extends SalesEmployee{
private int dixin;
public BasePlusSalesEmployee(int yueXiaoShouE, double tiChengLv, int dixin) {
super(yueXiaoShouE, tiChengLv);
this.dixin = dixin;
}
public BasePlusSalesEmployee(String name, int month, int yueXiaoShouE, double tiChengLv, int dixin) {
super(name, month, yueXiaoShouE, tiChengLv);
this.dixin = dixin;
}
public int getDixin() {
return dixin;
}
public void setDixin(int dixin) {
this.dixin = dixin;
}
public int getSalary(int month) {
if (month == getMonth()){
double v = getDixin() + (getYueXiaoShouE() * getTiChengLv());
return (int) (v+100);
}else {
double v = getDixin() + (getYueXiaoShouE() * getTiChengLv());
return (int) v;
}
}
}
//父类
package demo