Repository navigation
Expand file tree
/
Copy pathEmployee.java
More file actions
89 lines (70 loc) · 2.03 KB
/
Copy pathEmployee.java
File metadata and controls
89 lines (70 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package simplesolution.dev;
import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
public class Employee {
private int employeeId;
private String firstName;
private String lastName;
private Date birthDate;
private String address;
private String city;
private BigDecimal salary;
public Employee() {
}
public static Employee createEmployee(int employeeId, String firstName, String lastName, int birthYear, int birthMonth, int birthDate, String address, String city, BigDecimal salary) {
Employee employee = new Employee();
employee.setEmployeeId(employeeId);
employee.setFirstName(firstName);
employee.setLastName(lastName);
employee.setAddress(address);
employee.setCity(city);
employee.setSalary(salary);
Calendar calendar = Calendar.getInstance();
calendar.set(birthYear, birthMonth, birthDate);
employee.setBirthDate(calendar.getTime());
return employee;
}
public int getEmployeeId() {
return employeeId;
}
public void setEmployeeId(int employeeId) {
this.employeeId = employeeId;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
}

