machanic.java
来自「一个公司雇员的抽象系统」· Java 代码 · 共 30 行
JAVA
30 行
public final class Machanic extends Employee {
private int workpiece;
private double percentage;
public Machanic(String inName,double percentage) {
super(inName);
// TODO Auto-generated constructor stub
this.percentage =percentage;
}
public void setPercentage(double percentage) {
this.percentage =percentage;
}
@Override
public double getSalary() {
// TODO Auto-generated method stub
return (double) workpiece *percentage;
}
public void setWorkpiece(int amount) {
workpiece=amount;
}
public String getName() {
return super.getName();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?