📄 salariedworker.java
字号:
public class SalariedWorker extends Employee
{
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;
}
// toString method to display the Employee attributes, using super
public String toString()
{
String temp;
temp = super.toString();
temp += "Employee salary: $" + weeklySalary + "\n";
return temp;
}
} // end of SalariedWorker class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -