1 | public class BagOwner {
↵ | | 1 | public class Person {↵
|
| | | 2 | ↵
|
2 | private String name;
↵ | | 3 | private String name;↵
|
3 | private BagOwner parent;↵ | | 4 | private ↵
|
4 | private List children = new ArrayList();↵ | | |
|
5 |
↵ | | 5 | String employeeId;↵
|
| | | 6 | private Employee employee;↵
|
|
6 | public BagOwner() {↵ | | 7 | public ↵
|
7 | }↵ | | |
|
8 |
↵ | | 8 | Person() {}↵
|
9 | public BagOwner(String name) {
↵ | | 9 | public Person(String name) {↵
|
10 | this.name = name;
↵ | | 10 | this.name = name;↵
|
11 | }↵ | | 11 | }↵
|
12 |
↵ | | |
|
| | | 12 | ↵
|
13 | public String getName() {
↵ | | 13 | public Employee getEmployee() {↵
|
14 | return name;
↵ | | 14 | return employee;↵
|
15 | }↵ | | 15 | }↵
|
16 |
↵ | | |
|
| | | 16 | ↵
|
17 | public void setName(String name) {
↵ | | 17 | public void setEmployee(Employee employee) {↵
|
18 | this.name = name;
↵ | | 18 | this.employee = employee;↵
|
19 | }↵ | | 19 | }↵
|
20 |
↵ | | |
|
| | | 20 | ↵
|
21 | public BagOwner getParent() {
↵ | | 21 | public String getEmployeeId() {↵
|
22 | return parent;↵ | | 22 | return ↵
|
23 | }↵ | | |
|
24 |
↵ | | 23 | employeeId;↵
|
| | | 24 | }↵
|
| | | 25 | ↵
|
25 | public void setParent(BagOwner parent) {
↵ | | 26 | public void setEmployeeId(String employeeId) {↵
|
26 | this.parent = parent;↵ | | 27 | this.↵
|
27 | }↵ | | |
|
|
28 | public List getChildren↵ | | 28 | employeeId = employeeId;↵
|
| | | 29 | }↵
|
| | | 30 | ↵
|
29 | () {
↵ | | 31 | public String getName() {↵
|
30 | return children;↵ | | 32 | return ↵
|
31 | }↵ | | |
|
32 |
↵ | | 33 | name;↵
|
| | | 34 | }↵
|
| | | 35 | ↵
|
33 | public void setChildren(List children) {
↵ | | 36 | public void setName(String name) {↵
|
34 | this.children = children | | 37 | this.name = name
|