UML Abstract Class - Using Abstract Modifier

An abstract class in UML is a class that cannot be instantiated. It contains abstract operations (operations without body) whose behavior is defined in subclasses. This tutorial shows you how to set abstract modifiers to classes, attributes and operations.

Software Ideas Modeler supports abstract modifier in UML class diagrams for UML classes, attributes and operations.

What is an Abstract Class in UML?

A UML abstract class is a class without any instances. It represents a common class for other derived subclasses. An abstract class can contain abstract and also non-abstract attributes and operations. A class that is not abstract cannot have any abstract fields (attributes, operations).

E.g. a class for Shape can be marked as abstract. It cannot be instantiated because we do not know what kind of shape it represents. It is a base (super) class for other shape classes (e.g. Ellipse, Rectangle).

UML abstract class vs. instantiable (non-abstract) class
UML abstract class vs. instantiable (non-abstract) class

Create a UML Abstract Class

You can set the abstract modifier for a UML class in one of these ways:

1. Right-click on the class and choose Modifiers/Abstract from the context menu.

2. Open the Model tab in the Element context tab group and check the Abstract checkbox in the Modifiers group.

3. Double-click on the class, Properties dialog shows, check Abstract checkbox in Modifiers group, and confirm the choice using the OK button.

Create an Abstract Attribute or Operation

You can set the abstract modifier for an attribute or an operation in one of these ways:

1. Right-click on the attribute/operation and choose Modifiers/Abstract from the context menu.

2. Open the Model tab in the Field context tab group and check the Abstract checkbox in the Modifiers group.

3. Right-click on the attribute/operation and choose Properties from the context menu, Properties dialog shows, check Abstract checkbox in Modifiers group and confirm the choice using the OK button.

Set Abstract modifier to UML class and operations
Set Abstract modifier to UML class and operations

New Comment

Comment