gpt4 book ai didi

uml - 空 UML 类的正确图形表示是什么?

转载 作者:行者123 更新时间:2023-12-01 22:29:08 24 4
gpt4 key购买 nike

大多数 UML 工具表示一个空的 UML 类,其中属性和操作的字段都是空的。但是看看 UML 基础结构和上层结构,有很多空类显示为一个矩形,包括类名。但我找不到明确的说法,这两种表述中哪一种是绝对正确的。

那么哪种图形表示是正确的 - 两者都是正确的还是其中之一 - 你的信息来自哪里?

最佳答案

尽管@JimL 的回答是正确的,但这是 Superstructures 2.5 中解释隔间使用的部分:

The model in Figure B.6 specializes UMLDiagramElement and UMLShapeinto UMLCompartmentableShape and UMLCompartment, respectively, to makethem concrete, add properties, and redefine inherited properties forshapes with segregated contents.

UMLCompartmetableShape is the mostgeneral class for UML elements that may have information shown inseparated portions inside their shapes, usually arranged linearly andseparated by solid lines (compartments). It subsets ownedElement fromUMLDiagramElement to specify compartments that are to appearvertically ordered (first in order is shown at the top), where arecaptured with UMLCompartment. UMLCompartment subsets ownedElement fromUMLDiagramElement to specify contents of compartments that are toappear vertically ordered (first in order is shown at the top).UMLCompartments have no modelElements.

Compartment titles shall beinterchanged as UMLLabels with no modelElements, and as the firstorderedElement of UMLCompartments.

enter image description here

这意味着您可以显示从零到 N 个隔间。

关于uml - 空 UML 类的正确图形表示是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30377395/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com