1 | public class Employee extends Person {↵ | | 1 | public class Person {↵
|
2 | private String title;↵ | | 2 | private Long id;↵
|
3 | private String department;↵ | | 3 | private String name;↵
|
4 | private Employee manager;↵ | | 4 | private ↵
|
5 | private Set minions = new HashSet()↵ | | 5 | String company;↵
|
6 | ;↵ | | 6 | private String region;↵
|
|
7 | public Employee() {↵ | | 7 | public Person() {↵
|
8 | }↵ | | 8 | }↵
|
|
9 | public Employee(String name) {↵ | | 9 | public Person(String name) {↵
|
10 | super( name );↵ | | 10 | this.name = name;↵
|
11 | }↵ | | 11 | }↵
|
|
12 | public String getTitle() {↵ | | 12 | public Long getId() {↵
|
13 | return title;↵ | | 13 | return id;↵
|
14 | }↵ | | 14 | }↵
|
|
15 | public void setTitle(String title) {↵ | | 15 | public void setId(Long id) {↵
|
16 | this.title = title;↵ | | 16 | this.id = id;↵
|
17 | }↵ | | 17 | }↵
|
|
18 | public String getDepartment() {↵ | | 18 | public String getName() {↵
|
19 | return department;↵ | | 19 | return name;↵
|
20 | }↵ | | 20 | }↵
|
|
21 | public void setDepartment(String department) {↵ | | 21 | public void set↵
|
22 | this.department = department;↵ | | |
|
23 | }↵ | | |
|
|
24 | public Employee getManager↵ | | 22 | Name(String name) {↵
|
| | | 23 | this.name = name;↵
|
| | | 24 | }↵
|
|
25 | () {↵ | | 25 | public String getCompany() {↵
|
26 | return manager;↵ | | 26 | return company;↵
|
27 | }↵ | | 27 | }↵
|
|
28 | public void setManager(Employee manager) {↵ | | 28 | public void setCompany(String company) {↵
|
29 | this.manager = manager;↵ | | 29 | this.company = company;↵
|
30 | }↵ | | 30 | }↵
|
|
31 | public Set getMinions() {↵ | | 31 | public String getRegion() {↵
|
32 | return minions;↵ | | 32 | return region;↵
|
33 | }↵ | | 33 | }↵
|
|
34 | public void setMinions(Set minions) {↵ | | 34 | public void setRegion(String region) {↵
|
35 | this.minions = minions;↵ | | 35 | this.region = region;↵
|
36 | | | 36 |
|