1 | public class A {↵ | | 1 | public class Employee extends Person {↵
|
2 | private Long id;↵ | | 2 | private ↵
|
3 | private String name;↵ | | |
|
4 | private E forward;↵ | | |
|
5 | ↵ | | 3 | String title;↵
|
| | | 4 | private BigDecimal salary;↵
|
| | | 5 | private Employee manager;↵
|
6 | /**↵ | | 6 | /**↵
|
7 | * Returns the id.↵ | | 7 | * @return Returns the ↵
|
8 | * @return Long↵ | | 8 | title.↵
|
9 | */↵ | | 9 | */↵
|
10 | public Long getId() {↵ | | 10 | public String getTitle() {↵
|
11 | return id;↵ | | 11 | return title;↵
|
12 | }↵ | | 12 | }↵
|
13 | ↵ | | 13 | ↵
|
14 | /**↵ | | 14 | /**↵
|
15 | * Returns the name.↵ | | 15 | * ↵
|
16 | * @return String↵ | | |
|
17 | */↵ | | |
|
18 | public String getName() {↵ | | |
|
19 | return nam↵ | | 16 | @param title The title to set.↵
|
| | | 17 | */↵
|
| | | 18 | public void setTitle(String title) {↵
|
20 | e;↵ | | 19 | this.title = title;↵
|
21 | }↵ | | 20 | }↵
|
22 | ↵ | | 21 | ↵
|
23 | /**↵ | | 22 | /**↵
|
24 | * Sets the id.↵ | | 23 | * ↵
|
25 | * @param id The id to set↵ | | |
|
26 | */↵ | | |
|
27 | public void setId(Long id) {↵ | | |
|
28 | this.id = id↵ | | 24 | @return Returns the manager.↵
|
| | | 25 | */↵
|
| | | 26 | public Employee getManager() {↵
|
29 | ;↵ | | 27 | return manager;↵
|
30 | }↵ | | 28 | }↵
|
31 | ↵ | | 29 | ↵
|
32 | /**↵ | | 30 | /**↵
|
33 | * Sets the name.↵ | | 31 | ↵
|
34 | * @param name The name to set↵ | | 32 | * @param manager The manager to set.↵
|
35 | */↵ | | 33 | */↵
|
36 | public void setName(String name) {↵ | | 34 | public void setManager(Employee manager) {↵
|
37 | this.name = name;↵ | | 35 | this.manager = ↵
|
38 | }↵ | | |
|
39 | ↵ | | |
|
40 | public E getForw↵ | | 36 | manager;↵
|
| | | 37 | }↵
|
| | | 38 | /**↵
|
| | | 39 | * @return Returns the salary.↵
|
| | | 40 | */↵
|
41 | ard() {↵ | | 41 | public BigDecimal getSalary() {↵
|
42 | return forward;↵ | | 42 | return salary;↵
|
43 | }↵ | | 43 | }↵
|
| | | 44 | /**↵
|
| | | 45 | * @param salary The salary to set.↵
|
| | | 46 | */↵
|
44 | public void setForward(E e) {↵ | | 47 | public void set↵
|
45 | forw↵ | | 48 | Salary(BigDecimal salary) {↵
|
46 | ard = e | | 49 | this.salary = salary
|