In This Chapter
Showing how objects and classes relate
Figuring out how many objects relate to each other
Indicating which objects play multiple roles
Adding attributes to associations
Partitioning your objects
Implementing associations
UML allows modelers and programmers to show static relationships between classes and objects. If you’re a modeler, you describe relationships between objects that communicate with each other in the real world so you can better understand these objects and their classes. If you’re a programmer, you specify which objects interact with each other so you know how to define classes in your program. This chapter tells you about two types of relationships—links and associations—and shows you the UML notation for modeling these important relationships between objects and between classes.
You must resolve a lot of issues as you define and depict relationships between objects and classes. You need to figure out how to show an association and what makes a good association name. You also need to decide how many objects can link together. Then, you need to think about the details of associations, such as names at each end of an association, association classes, and qualifiers. These issues can be tricky, but we break them down for you. We also give you some pointers to help you accurately model various associations and take the mystery out of what modeling associations mean for your programs.