⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hourlyworker.java

📁 国外的数据结构与算法分析用书
💻 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 + -