写一段Java代码,模拟计算机行业招聘数据内容,字段有:招聘名称、月薪、学历要求、工作年限要求。
时间: 2023-03-30 22:00:33 浏览: 112
计算机专业求职简历模板
我可以回答这个问题。以下是一段Java代码,模拟计算机行业招聘数据内容:
public class Recruitment {
private String jobTitle;
private double monthlySalary;
private String educationRequirement;
private int workExperienceRequirement;
public Recruitment(String jobTitle, double monthlySalary, String educationRequirement, int workExperienceRequirement) {
this.jobTitle = jobTitle;
this.monthlySalary = monthlySalary;
this.educationRequirement = educationRequirement;
this.workExperienceRequirement = workExperienceRequirement;
}
public String getJobTitle() {
return jobTitle;
}
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
public double getMonthlySalary() {
return monthlySalary;
}
public void setMonthlySalary(double monthlySalary) {
this.monthlySalary = monthlySalary;
}
public String getEducationRequirement() {
return educationRequirement;
}
public void setEducationRequirement(String educationRequirement) {
this.educationRequirement = educationRequirement;
}
public int getWorkExperienceRequirement() {
return workExperienceRequirement;
}
public void setWorkExperienceRequirement(int workExperienceRequirement) {
this.workExperienceRequirement = workExperienceRequirement;
}
}
在这个类中,我们定义了四个字段:招聘名称、月薪、学历要求和工作年限要求。我们还定义了一个构造函数和四个getter和setter方法,以便在其他地方使用这些字段。这段代码可以用于模拟计算机行业的招聘数据。
阅读全文