As systems have become increasingly more complex, the need for communicating software systems has become a challenge. In response to that need, the Unified Modeling Language “UML” was developed and serves as a graphical language to describe those complex systems. UML is presently an industry standard representing a software system’s structure, interactions and behaviors in terms of graphical diagrams. UML has many types of diagrams each representing a different view of the system.
In object-oriented programming, classes are used to separate and encapsulate business objects and behaviors. The UML class diagram presents a ‘static’ view of those classes and their relationships. The class diagram is drawn as a rectangle and contains the class name, with optional compartments to separate class attributes and methods (Sparx Systems, 2007 p.8). Each attribute and methods visibility is referenced with a marker to symbolize public, private or protected. Connecting lines and arrows illustrate the relationship between those classes.
There are several types of relationships that can be depicted in class diagrams. In object-oriented systems, the concept of inheritance refers to sub-classes who might have access to shared characteristics of a base class. The class diagram defines this inheritance relationship type as generalization. To illustrate this relationship, a single line connects the class with an arrow pointing toward the base class.
Another common relationship type is known as ‘multiplicity’. For example, a student enrollment system that contains a “College” class would have a relationship with a “Student” class. Since a college can contain a collection of students, a line connecting the two classes will establish the relationship. However, notations called ‘multiplicity indicators’ are labeled close to end of the associations and are representative of the number of instances. In the book “The Elements of UML 2.0 Style” Ambler states, “For each class involved in a relationship, there will always be a multiplicity” (2005 chap. 5.3.117). This is because one-to-one type relationships are usually brought together in a single class.
The object diagram is similar to the class diagram in appearance, but builds on the static structure by adding a dynamic element in the form of object instantiation. In keeping with the student enrollment example, an object diagram would illustrate how several instances of the student class interact with one instance of the ‘College’ class. However, the object diagram would also include the attributes’ values. Therefore, object diagrams go beyond the static class view, to include some dynamic behavior in the form of class object instantiation.
There are other types of behavioral modeling in UML. For example, the use case diagram captures the behavioral requirements of a system. The use case diagram consists of individual “use cases” to describe “services or functions” (SmartDraw, Use...