
ClassîGradeîBookî
6îî2/18/2009î
î
F: Adding Assignment
We can reasonably assume that an Assignment is always associated with a particular Section.
Therefore, there should be an association between Section and Assignment, as shown in Fig. 6.
Also, there should be an association between an Assignment and a StudentSection, where
StudentSection maps a Student with a particular Section.
But what does the association between Assignment and StudentSection represent in practice? In
other words, what is its tangible representation in an actual classroom?
The answer: A completed assignment with its score. But how can you associate information
with this association?
We can âassociate informationâ with this association by replacing the association with a third
class, i.e., the CompletedAssignment class, which contains the studentâs score, as shown in Fig.
7.
Figure 6.
Figure 7.
StudentSection
Assignment
name:String 1..* 11..* 1
Section
number:String
11
StudentS ectionAssignment
name:St ring
1
Section
number:String
1
CompletedAs signment
score:int
1 11 1