Mark As Completed Discussion

Using UML to Represent Class Hierarchy

Object-oriented programming is used to design large systems with a lot of interconnected components. OOP is applied to desktop application design, web app development, and server program management. Top frameworks like .NET Framework, Django, Spring, Unity 3D all use object-oriented designs. All of these frameworks use thousands of classes to make the developers' lives a lot easier. For example, .Net Framework has implementations of 6025 classes!

It is not easy to demonstrate the relationships between thousands of classes, so a Unified Modelling Language (UML) was invented to create and share class relations between collaborators. UML is the standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems. UML is a pictorial language written with XML and has two major components for a diagram.

  1. Objects: Objects are the building blocks of UML. Typically, objects define classes and interfaces in the UML diagram.
  2. Relations: Relationships are mostly arrows from and to different objects in the diagram. They typically define inheritance, association, and modality.

UML is not just used to design OOP structures. It actually has many more uses, and there are lots of elements in UML that are not used for object-oriented design. We will leave those for now and only talk about the elements that are used for OOP.