Monday, October 23, 2006

Create Qualified Association in Rational Software Modeler

To create a qualified association in Rational Software Modeler, e.g. the 1 on 1 relationship between a team and a player by the qualifier of shirtNumber, follow the following steps,
  1. create the Team class
  2. create the Player class
  3. create the shirtNumber attribute in the Player class, make it "unique"
  4. create an association between Team and Player
  5. expand Team
  6. right-click on the player attribute of the Team, select Add UML > Qualifier
  7. completed
Don't be confused by the 1 on 1 multiplicity. Given the qualifier, it is 1 on 1 instead of 1 to many. Of course at the same time, a team can still contains many player.

No comments: