46

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

1 Answer 1

72

You have to write the class name in italic :

enter image description here

Here Contexte 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.

Sign up to request clarification or add additional context in comments.

6 Comments

Cool! Thanks :) What if we add <<abstract>> as a classifier?
Not standard, but a UML have to be readable and understandable. IMO a stereotype <<abstract>> is understandable. But you will not be able to generate code with this kind of approximations.
en.wikipedia.org/wiki/Stereotype_(UML) from this seems the <<abstract>> is a classifier other than a stereotype
Indeed, my bad^^
@GerdWagner Not correct. «abstract» is not UML 2.5 stereotype. P. 98: The isAbstract property of Classifier, when true, specifies that the Classifier is abstract, i.e., has no direct instances: every instance of the abstract Classifier shall be an instance of one of its specializations.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.