Java编写简历类岗位类
时间: 2023-09-24 12:02:43 浏览: 51
好的,以下是Java编写的简历类和岗位类的示例代码:
简历类 Resume:
```
public class Resume {
private String name;
private String gender;
private int age;
private String address;
private String phone;
private String email;
private String education;
private String workExperience;
public Resume(String name, String gender, int age, String address, String phone, String email, String education, String workExperience) {
this.name = name;
this.gender = gender;
this.age = age;
this.address = address;
this.phone = phone;
this.email = email;
this.education = education;
this.workExperience = workExperience;
}
public String getName() {
return name;
}
public String getGender() {
return gender;
}
public int getAge() {
return age;
}
public String getAddress() {
return address;
}
public String getPhone() {
return phone;
}
public String getEmail() {
return email;
}
public String getEducation() {
return education;
}
public String getWorkExperience() {
return workExperience;
}
@Override
public String toString() {
return "Name: " + name + "\n" +
"Gender: " + gender + "\n" +
"Age: " + age + "\n" +
"Address: " + address + "\n" +
"Phone: " + phone + "\n" +
"Email: " + email + "\n" +
"Education: " + education + "\n" +
"Work Experience: " + workExperience;
}
}
```
岗位类 Job:
```
public class Job {
private String title;
private String company;
private String location;
private String description;
private int salary;
public Job(String title, String company, String location, String description, int salary) {
this.title = title;
this.company = company;
this.location = location;
this.description = description;
this.salary = salary;
}
public String getTitle() {
return title;
}
public String getCompany() {
return company;
}
public String getLocation() {
return location;
}
public String getDescription() {
return description;
}
public int getSalary() {
return salary;
}
@Override
public String toString() {
return "Title: " + title + "\n" +
"Company: " + company + "\n" +
"Location: " + location + "\n" +
"Description: " + description + "\n" +
"Salary: " + salary;
}
}
```
以上是简单的Java示例代码,可以根据实际需要进行修改和扩展。
相关推荐
![](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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)