Introduction to UML

Niraj Markandey
2 min readJul 27, 2022

--

Hello Everyone! Here we are with the post number 2 of the series introduction to software design principles and patterns. Today’s topic is Introduction to UML.

UML as in Unified Modelling Language is a standard language for visualising and documenting software system. We are just going to go over few of the concepts in UML which we are going to use mostly to visualise patterns and principles. Only prerequisite is basic understanding of OO concept like class, interface, inheritance and how classes are related.

The following diagram is simply to explain the UML. Here we have a Class Person which has property name and method walk() (Can also be identified as behaviour).

Now we want to show that John is inherited from person which I can also write as John (is-a) Person. This is represented in UML as arrow with triangle head.

Also Person has one more property address which we want to implement separately. For this we have created address interface and I want to show that person (has-a) Address. (has-a) relation is shown by normal arrow (→).

JohnsAddress is concrete implementation of Address interface. And John (has-a) JohnsAddress Property.

UML diagram describing relation between person and address

Previous post can be found here: https://medium.com/@nirajmark/series-design-principles-and-patterns-introduction-c65db7671d17

Next Topic of the series will be Introduction to SOLID principles.

I write about design principles and pattern in LinkedIn Please follow me there as well https://www.linkedin.com/in/niraj-markandey-a6829a73/

--

--

Niraj Markandey

Hi I am a tech enthusiast, working as software developer from 6 years. I am passionate about design patterns and principles. I love to solve complex problems.