salariedworker.java
来自「国外的数据结构与算法分析用书」· Java 代码 · 共 22 行
JAVA
22 行
package Employees;
public class SalariedWorker extends GenericEmployee
{
protected int weeklySalary;
/** Constructor that takes the name, address, and number. */
public SalariedWorker(String n, String a, int e, int w)
{
super(n, a, e);
weeklySalary = w;
}
/** Method to display the Employee attributes, using super. */
public String toString()
{
String temp = super.toString();
temp += "Employee salary: $" + weeklySalary + "\n";
return temp;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?