applicant.java.bak

来自「java与mdb,一个简单的java访问数据库系统」· BAK 代码 · 共 56 行

BAK
56
字号
public class Applicant extends Person
{
	private String title;//职务
	private String department;//部门
	private String phone;//电话
	
	//构造函数,初始化申请者信息
	public Applicant(String id,String name,String title,String department,String phone)
	{
		super(id,name);
		this.setTitle(title);
		this.setDepartment(department);
		this.setPhone(phone);
	}

	//属性的get和set方法
	public void setTitle(String ti)
	{
		this.title=ti;
	}
	public String getTitle()
	{
		return this.title;
	}
	public void setDepartment(String dep)
	{
		this.department=dep;
	}
	public String getDepartment()
	{
		return this.department;
	}
	public void setPhone(String ph)
	{
		this.phone=ph;
	}
	public String getPhone()
	{
		return this.phone;
	}

	//显示申请者信息
	public void display()
	{
		super.display();
		System.out.println("Applicant Information:");
		System.out.println("\tTitle: "+getTitle());
		System.out.println("\tDepartment: "+getDepartment());
		System.out.println("\tPhone: "+getPhone());
	}

	public String toString()
	{
		return getName()+"("+getTitle()+","+getDepartment()+","+getPhone()+")";
	}
}

⌨️ 快捷键说明

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