Page 817 - Introduction to Programming with Java: A Problem Solving Approach
P. 817
Figure A7.5 Improved version of class diagram in Figure 12.22
An arrowhead on an association line means the adjacent class does not have references to the other classes in that association.
classes in the common association, we put barbed arrowheads on the three ends of the association line that
3
connects them. This changes Figure 12.22 to what appears in Figure A7.5.
Notice that Figure A7.5 also includes a composition association between Dealership3 and Sale.
The barbed arrowheads at the Sale and Car ends of their respective composition lines and at the SalesPerson2 end of its aggregation line say that Dealership3 depends on these other classes. In
Apago PDF Enhancer
other words, Dealership3 has references to instances of the Sale, Car and SalesPerson2 classes, but not vice versa. In contrast, the aggregation association between Dealership3 and Manager2 does not have any arrowheads. This says each has a reference to the other.
3 Notice the small diamond at the intersection of the Sale association lines. This UML detail helps distinguish a junction from a cross-over.
Appendix 7 UML Diagrams 783
Person
Manager2
1*
Car Sale ** 1111
Dealership3
SalesPerson2
Customer
Sale is an association class. Barbed arrowheads on the association line say all references are in the Sale class.