3
votes

What I would like to ask is that if one class has a variable of array, should I include it as attribute along with the association or only the association?

So, for example, if I want to draw a simple diagram about association between professor and lecture, which side would be correct (Upper one or the lower one)? - Lecture may have more than one instructor

enter image description here

1
you have a many-to-many relationship here, you better think of using an association class - Sam
@RisingSilver Many-to-many does not necessarily mean association class. - qwerty_so
@ThomasKilian I didn't say that it does, I just suggested it. - Sam
@ElSam Sound's like you're in the advertisement business xD And you're still free to implement it as AC (which you would do when using it in a database) even if not explicitly written as such. - qwerty_so

1 Answers

1
votes

You would use the dot notation with role names like this:

enter image description here

It means that Professor has * lectures as owned property and vice versa Lecture has 1..* teachers.

The dot and role name are located "on the opposite site" of the owning class.