📄 applicant.java.bak
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -