How to present an abstract class in UML class diag

2019-04-19 12:04发布

问题:

UML class diagram is a handy tool in object-oriented design. I am using it currently and facing presenting an abstract class with UML. I googled it but got nowhere.

So I would like to ask how to express an abstract class in UML class diagram, and it must be able to differentiate from concrete class

回答1:

You have to write the class name in italic :

Here Context is an abstract class and Structure is a "concrete" class

P. 99 of the specs says:

The name of an abstract Classifier is shown in italics, where permitted by the font in use. Alternatively or in addition, an abstract Classifier may be shown using the textual annotation {abstract} after or below its name.