How to create abstract class in MagicDraw

天涯浪子 提交于 2020-01-04 05:47:09

问题


I'm newbie in MagicDraw and I'd like to know how to specify a class as {abstract}.

I know about de property "Is abstract" in the Specification of Class, but I'd like that it appears in the header.


回答1:


The place where you set isAbstract in MagicDraw is in the specification window for the class. To open that window, either right-click on the class or press enter while it is selected. The window will look like this:

You didn't specifically ask for more information, but I'll provide it in case you find it helpful.

The model you want to create will look like this:

Notice that Abstract Class is written in italics to indicate it is abstract. Also notice that {complete, disjoint} is specified for the generalization set. (Just FYI, {complete} is also known as a covering axiom.)

Beware that if you do not specify {complete}, you're creating a conflict with the isAbstract meta-property. The reason there's a conflict is that in UML, the default is {incomplete}, which means that you are allowed to create an instance of the super-class without it also being an instance of one of the sub-classes. That conflicts with isAbstract.



来源:https://stackoverflow.com/questions/35949652/how-to-create-abstract-class-in-magicdraw

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!