1 | public class Customer {↵ | | 1 | public class ↵
|
|
|
|
2 | public Customer() {↵ | | |
|
|
3 | super();↵ | | |
|
|
4 | }↵ | | |
|
|
|
|
5 | public Customer(String orgName, String custName, String add↵ | | 2 | Employee {↵
|
| | | 3 | private String personName;↵
|
| | | 4 | private Person person;↵
|
| | | 5 | private Collection employments = new ArrayList(); ↵
|
| | | 6 | Employee() {}↵
|
6 | ) {↵ | | 7 | public Employee(Person p) {↵
|
|
7 | this.orgName = orgName;↵ | | 8 | this.↵
|
|
8 | this.customer↵ | | 9 | person = p;↵
|
9 | Name = custName;↵ | | 10 | this.personName = p.getName↵
|
|
10 | this.address = add;↵ | | |
|
|
11 | }↵ | | |
|
|
|
|
12 | private String orgName;↵ | | |
|
|
13 | private String customerName;↵ | | |
|
|
14 | private String address;↵ | | |
|
|
|
| | | 11 | ();↵
|
| | | 12 | p.setEmployee(this);↵
|
| | | 13 | }↵
|
15 | public String getAddress() {↵ | | 14 | public Person getPerson() {↵
|
|
16 | return address;↵ | | 15 | return person;↵
|
|
17 | }↵ | | 16 | }↵
|
|
|
|
18 | public void setAddress(String address) {↵ | | 17 | public void setPerson(Person person) {↵
|
|
19 | this.address = address;↵ | | 18 | this.person = person;↵
|
|
20 | }↵ | | 19 | }↵
|
|
|
|
21 | public String getCustomerName() {↵ | | 20 | public String getPersonName() {↵
|
|
22 | return customerName;↵ | | 21 | return personName;↵
|
|
23 | }↵ | | 22 | }↵
|
|
|
|
24 | public void setCustomerName(String customerName) {↵ | | 23 | public void setPersonName(String personName) {↵
|
|
25 | this.customerName = customerName;↵ | | 24 | this.personName = personName;↵
|
|
26 | }↵ | | 25 | }↵
|
|
|
|
27 | public String getOrgName() {↵ | | 26 | public Collection getEmployments() {↵
|
|
28 | return orgName;↵ | | 27 | return ↵
|
| | | 28 | employments;↵
|
29 | }↵ | | 29 | }↵
|
|
|
|
30 | public void setOrgName(String orgName) {↵ | | 30 | public void setEmployments(Collection employments) {↵
|
|
31 | this.orgName = orgName | | 31 | this.employments = employments
|