写一段Java代码,模拟计算机行业招聘数据内容,字段有:招聘名称、月薪、学历要求、工作年限要求。
时间: 2023-03-30 12:00:33 浏览: 104
我可以回答这个问题。以下是一段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方法,以便在其他地方使用这些字段。这段代码可以用于模拟计算机行业的招聘数据。
相关推荐
![text/x-c](https://img-home.csdnimg.cn/images/20210720083646.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)