📄 hourlyworker.java
字号:
/** A class for an Employee that works by the hour. It includes variables
for the hourly wage and the hours worked. */
public class HourlyWorker extends Employee
{
/** Hourly wage of the Employee. */
float hourlyWage;
/** Hours worked by the Employee. */
float hoursWorked;
/** Constructor that initializes the name, address, employee number, hourly rate, and hours. */
public HourlyWorker(String n, String a, int e, float wage, float hours)
{
super(n, a, e);
hourlyWage = wage;
hoursWorked = hours;
}
/** String representation of the Employee and salary information. */
public String toString()
{
return super.toString() + "Employee salary: $" + hourlyWage * hoursWorked + "\n";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -