Association Classes

I l @ ve RuBoard

A relationship may also have structure and behavior. This is true when the information deals with a link between two objects and not with one object by itself.

Consider the following example: A student may take up to four course offerings, and course offering may have between three and ten students. Each student must receive a grade for the course offering. Where is the grade held? It doesn't belong to the student since a student will probably have different grades for different course offerings, and it doesn't belong to the course offering since a course offering has different grades for different students. The information belongs to the link between a student and a course offering. This is modeled as an association class. Since an association class behaves like any other class, it too can have relationships. Following our example, a student receives a report card each semester that is made up of all the linked grade objects for the student.


  1. Click to select the Class icon from the toolbar.

  2. Click on the diagram to place the class.

  3. With the class selected, enter the name of the class.

  4. Add the attributes and operations to the class.

  5. Click to select the Association Class icon from the toolbar.

  6. Click on the association class and drag the association class line to the association it modifies.

  7. Create any additional relationships for the association class.

The association class Grade is shown in Figure 7-7.

Figure 7-7. Association Class


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 © 2008-2017.
If you may any questions please contact us: