Docsity

Class Grade Book: Association between Assignment and StudentSection - Prof. Paul C. Grabow, Assignments of Software Engineering

Toggle sidebar
bg1
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
pf2

Partial preview of the text

Download Class Grade Book: Association between Assignment and StudentSection - Prof. Paul C. Grabow and more Assignments Software Engineering in PDF only on Docsity!

Class Grade Book

F 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.: Adding Assignment

Also, there should be an association between an Assignment and a StudentSection, whereStudentSection 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 informationwith this association?

We can “associate information” with this association by replacing the association with a thirdclass, i.e., the CompletedAssignment class, which contains the student’s score, as shown in Fig.7.

Figure 6.

Figure 7.

Assignment name:String 1..1.. 11 StudentSection

number:StringSection 11

Assignment name:String StudentSection

number:StringSection 11

CompletedAssignment score:int

Class Grade Book

Therefore, putting Fig. 7 together with Fig. 5 we get Fig. 8, showing all of the classes. And if weadd some plausible non-key attributes, we get Fig. 9.

Figure 8.

Figure 9. Completed Domain Model

1 sectionNumber:int^ Section

StudentSection

1 11 number:StringCourse

abbr:StringDept^11

ID:int name:StringStudent^11

1 Assignment name:String due:Date^11

CompletedAssignment score:int submitted:Date

sectionNumber:intSection St udentSection

(^11 11) number: String name:S tringCourse abbr:String name:S tringDept^11

ID: int name:S tringSt udent^11 As signment name:S tring due:Date^11 CompletedAssignment sc ore:int submit ted:Date