In class diagrams, an abstract generalization is a dependency relationship in which a mapping exists between the parent and the child.
An abstract generalization is much like the generalization or inheritance relationship between classes. With abstract generalization, a parent class forces the child class to inherit certain functionality to create an interface.
For example, when you visualize a C/C++ class and abstract generalization, a parent class can become an interface or design template. The Vehicle class is a parent class that uses an abstract generalization. The Vehicle class becomes a design template or interface for all its children by forcing them to use certain operations. The Child class Boat inherits several operations from the Vehicle class. The Boat class cannot be implemented without using those operations. Therefore, the Vehicle class acts as a design interface for all its children.
In UML visualization class diagrams, an abstract generalization is shown by differentiating the title of the class from other classes. A parent class that uses an abstract generalization has a class title in italic letters. As well, all operations that are inherited by its children (pure virtual operations) also appear in italics.
The following figure illustrates the differences between a normal generalization relationship and an abstract generalization relationship.
C/C++ normal generalization | C/C++ abstract generalization |