The Unified Modeling Language (UML) is a visual language for constructing and documenting the artifacts of software-intensive systems. UML is used particularly in software and business modeling. UML is also often used for information modeling and logical data modeling, where classes are used to represent entities. The UML uses graphical notations to express the design of software projects. It is a valuable tool to help project teams communicate, explore potential designs, and validate the architectural design of the software [20,23].
UML class diagrams are used to describe objects and their relationships. A class diagram is represented by a rectangle, divided into three sections: the name of a class, its attributes, and operations. The name of an attribute is followed by a colon and a valid type, as depicted in Fig. 3, where the attribute name of the class Patient is defined as:
Operations are normally used to retrieve, manipulate, and compute attribute values. For example, the age operation in the Patient class (Fig. 3) takes the current date and the patient's DOB as input parameters and returns the age of the patient in number of years. The notation for operations is as follows:
Operation (parameter list): Return Type
The parameter list contains the input parameter passed to the operation using the following notation:
Input parameters are optional. However, for clarity it is best to include them whenever possible. Relationships between classes are represented by binary associations. For example, in Fig. 3, the line segment connecting the classes Patient and Medication indicates a relationship. The multiplicity or cardinality of an association may be indicated numerically, e.g., as 1..* in Fig. 3. The cardinality of an association is denoted by Minimum... Maximum, where Minimum indicates the minimum number of instances of an entity type that may be associated with each instance of any other entity type, and Maximum is the maximum number of instances of an entity type that may be associated with each instance of any other entity type.
This section is meant as an introduction to the UML classes. A more detailed description, including N-ary associations, aggregations, subtyping and statechart diagrams with additional sources can be found in .
Was this article helpful?