Using UML to plan a sample hierarchy
Unified Modeling Language (UML) is a tool that programmers use to visually communicate the structure of large systems during the design phase and when creating technical documentation. Classes are represented as boxes, with relationships shown through different types of arrows linking the boxes.
What are the types of class relations?
Let us take a look at different types of class relations and how they are presented using UML class diagrams.
Inheritance
Standard arrows, as seen in Figure 7.1, show inheritance with the parent being indicated by the end with the arrow head.
Figure 7.1 – An example of a UML class diagram showing inheritance syntax
In Figure 7.1, the Character and Vehicle classes inherit from the Pawn class.
Composition
Composition is a type of class relation where the composed classes give the parent class the functionality. This tool is seen a lot with multi-functional classes...