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. CREATING ASSOCIATION CLASSES IN RATIONAL ROSE
The association class Grade is shown in Figure 7-7. Figure 7-7. Association Class
|
I l @ ve RuBoard |