CHAPTER 6

How to Capture Rules about Object Relationships

images

In This Chapter

  • Exploring the purpose and function of associations
  • Defining and modeling binary and n-ary associations
  • Defining and modeling an association class
  • Defining and modeling aggregation
  • Defining and modeling composition
  • Defining and modeling inheritance using generalization and specialization
  • Defining and modeling dependencies
  • Defining and modeling collaborations

images

A software application requires a set of resources. To use them you need to describe each resource using a class definition. Classes describe the types of resources, their purpose, and the features that they provide, including attributes and operations.

But to coordinate the interaction of these resources, you need to explain how they can communicate. To communicate, they need to be aware of one another. Just as people use various means to communicate like phone calls and mail or e-mail, objects also need to define a means to communicate. They need to define a type of relationship. UML relationships come in three different types: association, generalization, and dependency.

An association is a semantic relationship between two model elements. In a Class diagram, an association defines the rules that apply to relationships between the objects defined ...

Get UML™ Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.