Reflexive Relationships

I l @ ve RuBoard

Multiple objects belonging to the same class may have to communicate with one another. This is shown on the class diagram as a reflexive association or aggregation. Role names rather than association names typically are used for reflexive relationships.

CREATING A REFLEXIVE RELATIONSHIP IN RATIONAL ROSE

graphics/quatranirose_icon.gif
  1. Select the Association (or Aggregation) icon from the toolbar.

  2. Click on the class and drag the association (or aggregation) line outside the class.

  3. Release the mouse button.

  4. Click and drag the association (or aggregation) line back to the class.

  5. Enter the role names and multiplicity for each end of the reflexive association (or aggregation).

A reflexive relationship is shown in Figure 6-8.

Figure 6-8. Reflexive Relationship

graphics/06fig08.jpg

The reflexive relationship in Figure 6-8 may be read in the following ways:

  • One Course object playing the role of Prerequisite is related to zero or more Course objects.

  • One Course object is related to zero or more Course objects playing the role of Prerequisite.

I l @ ve RuBoard


Visual Modeling with Rational Rose 2002 and UML
Visual Modeling with Rational Rose 2002 and UML (3rd Edition)
ISBN: 0201729326
EAN: 2147483647
Year: 2002
Pages: 134

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net