1 | public class Child {↵ | | 1 | public class Employee extends Person {↵
|
2 | private Long id;↵ | | 2 | private ↵
|
3 | private String name;↵ | | |
|
4 | private Parent parent↵ | | 3 | String title;↵
|
| | | 4 | private BigDecimal salary;↵
|
5 | ;↵ | | 5 | private Employee manager;↵
|
6 | /**↵ | | 6 | /**↵
|
7 | * @return Returns the id.↵ | | 7 | * @return Returns the title.↵
|
8 | */↵ | | 8 | */↵
|
9 | public Long getId() {↵ | | 9 | public String getTitle() {↵
|
10 | return id;↵ | | 10 | return title;↵
|
11 | }↵ | | 11 | }↵
|
12 | /**↵ | | 12 | /**↵
|
13 | * @param id The id to set.↵ | | 13 | * @param title The title to set.↵
|
14 | */↵ | | 14 | */↵
|
15 | public void setId(Long id) {↵ | | 15 | public void setTitle(String title) {↵
|
16 | this.id = id;↵ | | 16 | this.title = title;↵
|
17 | }↵ | | 17 | }↵
|
18 | /**↵ | | 18 | /**↵
|
19 | * @return Returns the name.↵ | | 19 | * @return Returns the manager.↵
|
20 | */↵ | | 20 | */↵
|
21 | public String getName() {↵ | | 21 | public Employee getManager() {↵
|
22 | return name;↵ | | 22 | return manager;↵
|
23 | }↵ | | 23 | }↵
|
24 | /**↵ | | 24 | /**↵
|
25 | * @param name The name to set.↵ | | 25 | * @param manager The manager to set.↵
|
26 | */↵ | | 26 | */↵
|
27 | public void setName(String name) {↵ | | 27 | public void setManager(Employee manager) {↵
|
28 | this.name = name;↵ | | 28 | this.manager = manager;↵
|
29 | }↵ | | 29 | }↵
|
30 | /**↵ | | 30 | /**↵
|
31 | * @return Returns the parent.↵ | | 31 | * @return Returns the salary.↵
|
32 | */↵ | | 32 | */↵
|
33 | public Parent getParent() {↵ | | 33 | public BigDecimal getSalary() {↵
|
34 | return parent;↵ | | 34 | return salary;↵
|
35 | }↵ | | 35 | }↵
|
36 | /**↵ | | 36 | /**↵
|
37 | * @param parent The parent to set.↵ | | 37 | * @param salary The salary to set.↵
|
38 | */↵ | | 38 | */↵
|
39 | public void setParent(Parent parent) {↵ | | 39 | public void set↵
|
40 | this.parent = parent | | 40 | Salary(BigDecimal salary) {↵
|
| | | 41 | this.salary = salary
|