OOP: UML

Leveraing UML to Describe Classes

Free UML Tool: https://www.visual-paradigm.com/solution/freeumltool/

In my OOP Class Design article, I basic principles for designing a class. At the end of the article I used a UML diagram for the class to describe its characteristics which I’ll describe in this article.

The Unified Modeling Language (UML) was created to efficiently describe scenarios and their characteristics.

In software projects, using UML diagrams provides a very quick way to communicate all aspects necessary for collaborative development among a team.

In the following two images I illustrate code from the Employee class and a UML diagram describing that class.

UML Conventions

UML Software classes are contained in a box divided into three sections, each divided by a line:

  • (top) Class name
  • (middle) Attributes: This section describes a class’ data, note the minus sign which denotes a private class member, only accessible within the class.
  • (bottom) Methods: This section describes a class’ behavior, note the plug sign which denotes a public class member, accessible from a class’ objects. Class methods are typically used to access class attributes.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s