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