请确认我尝试阅读以下关联的多重性

时间:2013-12-13 20:36:46

标签: uml

enter image description here

1个零或多个Person类型的对象应与每个

相关联

Company

类型的对象

类型为Company的零个或多个对象应与

相关联

Person

类型的每个对象

类型为Woman的3个零或一个对象应与每个

相关联

Man

类型的对象

类型为Man的4个零或一个对象应与每个对象相关联

类型Woman


5个Person类型的对象应该与

的每个对象相关联

输入Car

类型为Car的6个零或多个对象应与每个

相关联

Person

类型的对象

类型为line的7个零或一个对象应与每个对象相关联

类型Point

8个类型为Point的对象应该与

的每个对象相关联

输入Line

1 个答案:

答案 0 :(得分:4)

你的读数都是正确的。几点意见/建议:

您可以更简洁地编写文本短语,如下所示:

Each Person is associated with zero or more Company(ies)
....
Each Car is associated with exactly one Person
....

(注意使用复数'公司' - 读得更好)

如果您添加动词短语来描述关系的含义而不仅仅使用'与...相关联',这确实很有帮助。

Each Person is employed by zero or more Companies
Each Company employs zero or more People
....
Each Car is owned by exactly one Person
Each Person owns zero or more Cars
....

HTH