The UML (Unified Modeling Language) is a notation for modeling object-
oriented ... [1] Grady Booch, Ivar Jacobson, and James Rumbaugh. The Unified ...
UML - class diagram
Practical Course Integrative Bioinformatics March 6, 2012
1
The UML (Unified Modeling Language) is a notation for modeling objectoriented software systems. It includes many different types of diagrams for different views of a software system. Class diagram UML [1, 2] class diagrams mainly show classes and connections among classes. The most common elements of a UML class diagram are therefore classes and relationships. • Classes are subdivided rectangles with a name section (upper part), an attribute section (middle part) and a method section (bottom part). The attribute and method sections can be left out when not of interest. • Associations, drawn as simple lines, describe connections among instances of given classes. Numbers at the end of an association indicate the number of objects that participate in the given association. Additionally, a role and some other information can be given. ) represent a part-whole relationship. The hollow dia• Aggregations ( mond is attached to the composite class. ) are stronger aggregations, in which the composite • Compositions ( has responsibility for managing the parts. It is shown by a filled diamond. • Generalizations ( ) relate more general parent classes to more specialized child classes. The child class has all the properties of the parent class and may contain additional functionality. The arrow head points towards the parent class. Fig. 1 and 2 show examples for aggregation and generalization. An introduction to UML can be found on the web site of IBM Rational under the URL http://www-306.ibm.com/software/rational/uml/. A simple editor for UML (and other graph based diagrams) is yEd developed by yWorks GmbH, T¨ ubingen. It is written in Java and available for many platforms, including Linux and Windows. yEd is available as a free download from http://www.yworks.com/en/products yed about.html. The software is already installed on the computers used in the Praktikum, just type yed.
2
Figure 1: Example of an aggregation.
Figure 2: Example of a generalization.
References [1] Grady Booch, Ivar Jacobson, and James Rumbaugh. The Unified Modeling Language for Object-Oriented Development, Documentation Set Version 1.1. Rational Software Corporation, Monterey, CA, 1997. [2] James Rumbaugh, Ivar Jacobson, and Grady Booch. The Unified Modeling Language Reference Manual. Addison-Wesley Longman, Amsterdam, 2nd edition, 2004.
3