1 | public class Person {
↵ | | 1 | public class Employee extends Person {↵
|
2 | private Long id;↵ | | 2 | private ↵
|
3 | private String name;↵ | | |
|
4 | private BankAccount bankAccount;↵ | | |
|
5 |
↵ | | 3 | String title;↵
|
| | | 4 | private BigDecimal salary;↵
|
| | | 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 = ↵
|
29 | }↵ | | |
|
|
30 | public BankAccount getBankAccount↵ | | 29 | manager;↵
|
| | | 30 | }↵
|
| | | 31 | /**↵
|
| | | 32 | * @return Returns the salary.↵
|
| | | 33 | */↵
|
31 | () {
↵ | | 34 | public BigDecimal getSalary() {↵
|
32 | return bankAccount;↵ | | 35 | return ↵
|
33 | }↵ | | |
|
34 | public void setBankAccount(BankAccount bankAccount↵ | | 36 | salary;↵
|
| | | 37 | }↵
|
| | | 38 | /**↵
|
| | | 39 | * @param salary The salary to set.↵
|
| | | 40 | */↵
|
35 | ) {
↵ | | 41 | public void setSalary(BigDecimal salary) {↵
|
36 | this.bankAccount = bankAccount | | 42 | this.salary = salary
|