class 中的 UML 无字段(状态)
UML no fields (state) in class
如果我的 class(界面)没有字段,我应该留白 space 以表明有 to state 吗?
配白色space:
无白space:
我会搭配白色space。我在网上看到过一些这样的例子 (https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/)。在图 10 中,Person 接口没有方法,但是存在放置方法的 space。
两种方式都可以。隔间可以随意设置。使用最适合您口味的东西。但是,您应该设置建模规则,将隔间的使用限制在您认为最好的范围内。 UML 规范,例如在 p 上使用它。 16:
Within such a diagram, all of the metaclasses described in that clause are depicted with their attribute compartments, while metaclasses whose definition appears in another clause are depicted with just their headers and no compartments.
还有第 193 页的更多示例。
P.S。我刚刚查看了 EA 显示的情况,它不会显示空隔间,而是完全抑制它。
如果我的 class(界面)没有字段,我应该留白 space 以表明有 to state 吗?
配白色space:
无白space:
我会搭配白色space。我在网上看到过一些这样的例子 (https://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/)。在图 10 中,Person 接口没有方法,但是存在放置方法的 space。
两种方式都可以。隔间可以随意设置。使用最适合您口味的东西。但是,您应该设置建模规则,将隔间的使用限制在您认为最好的范围内。 UML 规范,例如在 p 上使用它。 16:
Within such a diagram, all of the metaclasses described in that clause are depicted with their attribute compartments, while metaclasses whose definition appears in another clause are depicted with just their headers and no compartments.
还有第 193 页的更多示例。
P.S。我刚刚查看了 EA 显示的情况,它不会显示空隔间,而是完全抑制它。