--------- ---------
| | * * | |
| Person |________________| Company |
| | | | |
--------- | ---------
|
______|______
| |
| |
| Employment |
| |
|_____________|
I try to design a classes with association class in JAVA , but i don't understanding how to use the association class in implementation .. but I understanding the benefits for it.
this what I try to do it :
public class person {
protected employment emp;
.
.
}
public class company {
protected employment emp;
.
.
}
public class employment {
protected person p[];
protected company c[];
.
.
}
Is the relationship and the implementation is correct ?