There are many types of relationships - consider
- Car and wheels
- Car and driver
- Car and registered owner
- Order and order and order
- School and class and class copy
UML-, , Aggegration , , .
, .
d). .
- , . , , , IDriver Person, IDriver , Automobile. , .
a). . , Factory. , factory. :
IPerson aPerson = myAutomobile.createDriver( );
IPerson aPerson = aPersonFactory.create( );
myAutomobile.addDriver(aPerson);
, , , - . , , OrderLines, ClassInstances?
). ? Collection. (-, - ..) , . - .. . / - (frontLeft, frontRight, backLeft, backRight, ). "" , . , JPA.
). ? , . , car.addDriver() . - , , . OO, , . : " " , , , addDriver(), , , .