Class 图重数混淆

Class diagram multiplicity confusion

我正在尝试绘制 class 图,但我不确定我所做的是否正确。

场景 这所大学有一个规定,一门课最多只能由两个讲师讲授。每个讲师只教0到两门课。

是的,这是正确的;作为助记术,你可以把它读成一个句子

"Lecturer teaches [0..2] Course(s)"

"Course is taught by [1..2] Lecturer(s)"

The multiplicity attached to the target end denotes the possible cardinalities of the set of target instances selected by the pairing of a qualified instance and a qualifier value.

(http://www.omg.org/spec/UML/2.5/Beta1/PDF/ 章节 11.5 关联)