关于 class 图中定向关联 link 的问题

Questions regarding directed association link in class diagram

我有三个关于 class 图中定向关联 link 的问题。 这是我所做的截图。我正在使用模型。

截图说明: 屏幕截图显示了 class“连衣裙”link由定向关联 link 编辑到名为“TypeOfClothes”的枚举。

这是我的问题:

1: 当两个 class 或一个 class 和一个枚举 link 与定向关联 link 像这里一样,关联的 none 箭头部分下的多重性是什么意思?

2:据我了解,association上面的属性和classtypeOfDress下面的属性是一个意思。然而,当仅与关联一起给出时,模型中没有创建属性。我哪里错了吗?

3: 如果我在关联的 none 箭头侧给出了一个属性,那意味着什么?

我希望它是可以理解的,如果不是,请告诉我我可以改进的地方:) 感谢您的帮助,祝您有愉快的一天!

1: When two class or a class and an enumeration are linked together with a directed association link like here what does the multiplicity under the none arrowhead part of the association means ?

关系无法从 TypeOfClothes 导航到 Dress 的事实并不意味着无法限制数量与 TypeOfClothes 关联的 Dress 的实例数。所以多重性是给定的,在这里 * 这意味着从 0 开始的任何数字。

2: From what I understand, the attribute above the association means the same thing as the attribute under the class typeOfDress. however there is no attribute created in the model when given only with association. Am i wrong somewhere ?

在class图中显示同名的关联和属性是合法的,即使这是多余的,只有其中一个就足够了。来自标准 formal/2017-12-05 第 206 页:

Figure 11.31 shows that the attribute notation can be used for an Association end owned by a Class, because an Association end owned by a Class is also an attribute. Although it would typically be suppressed on grounds of redundancy, this notation may be used in conjunction with the association notation to make it perfectly clear that the attribute is also an Association end.

属性是拥有的 属性,因此如果您的 class 拥有 属性 即使您没有在属性隔间中提及它,您也拥有该属性

3: If I had an attribute given on the none arrowhead side of the association what would that means ?

该关系无法在该方向导航,因此如果您在 * 附近添加一个名称,它只是提供信息,它不是 TypeOfClothes[=36 的 属性 =],所以最好不要它


其中 typeOfDresspublic 因为 +,你确定要那个吗?