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

📄 employee.java

📁 大学java作业源程序
💻 JAVA
字号:
package problem_9;
//Employee.java
//雇员类,继承人类
public class Employee extends Person{
	private String office;		//办公室信息
	private double wage;		//薪水
	private String hiredate;	//雇佣日期
	
	public Employee(String name, String address, String telephone, String email, String office, double wage, String hiredate){
		super(name, address, telephone, email);
		this.office = office;
		this.wage = wage;
		this.hiredate = hiredate;
	}
	
	//返回办公室信息
	public String getOffice(){
		return office;
	}
	
	//返回薪水
	public double getWage(){
		return wage;
	}
	
	//返回雇佣日期
	public String getHiredate(){
		return hiredate;
	}
	
	//设置办公室信息
	public void setOffice(String office){
		this.office = office;
	}
	
	//设置薪水
	public void setWage(double wage){
		this.wage = wage;
	}
	
	//设置雇佣日期
	public void setHiredate(String hiredate){
		this.hiredate = hiredate;
	}
	
	//重写toString()函数,打印雇员信息
	public String toString(){
		return super.toString().concat("办公室:" + office + "\n工资:" + wage + "\n受雇日期:" + hiredate + "\n");
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -