UML – Class Diagram – Generalization & Realization

Class diagram represents the static low level design of the application. Class diagrams are static in nature and it represent different kinds of objects exist in the system and the relationship between those objects. Class diagram also help the reader to understand different states, behaviors in the object and it’s visibility.

In general, there are three kinds of object relations represented using UML class diagram.

In this post we will focus on Generalization and Realization.

Generalization

In ‘generalization’/'inheritance’/'is a’ relationship the sub type(s) is considered as more specialized implementation and the super type has got some generic state and behavior which may be reused in the subtypes. In other words, super type is considered as generalization of sub type(s).

Inheritance generalization

The graphic representation of generalization is hollow triangle shape on the superclass end of the line.

How to code generalization in java?

Realization

In realization a type gives implementation or realization of an abstract type.

realization uml

The graphic representation of generalization is hollow triangle shape on the superclass end of the doted line. Both generalization and realization are considered as relationship on class level or at compile time itself.

How to code realization in java?

куда сдать воду на анализ

2 thoughts on “UML – Class Diagram – Generalization & Realization