1. UML Notation Elements
The following chapter contains excerpts from the book “UML 2 kompakt” by Heide Balzert. For a complete view of the UML notation you must refer to the book.
1.1. Object
In the object-oriented software development an object possesses a certain condition and reacts with a defiierten behavior to its environment. In addition, each object has an identity that distinguishes it from all other objects.
The state of an object includes the attributes or their current values and the respective object relationships to other objects. Attributes are inherent, unchanging characteristics of the object, while attribute values may be subject to change.
The behavior of an object is described by a set of operations. A change or a query of the state is only possible by means of the operations.
The object is represented in UML as a rectangle, which can be divided into two fields. In the upper field the object is designated as follows:
- :Class
if the object is anonymous, only the class name is specified.
- object:Class
if the object is to be addressed by a name.
- object
if the object name is sufficient to identify the object and the name of the class is evident from the context.
The name of the object is always underlined. Object names start with a lowercase letter in UML, class names with an uppercase letter. Anonymous objects are used if it is any object of the class. Object names are used to name a specific object of the class for the system analyst.
In the lower field - optionally - the relevant attributes of the object in the respective context are entered. The UML allows the following alternatives:
- attributetype = value
.
- attribute = value
recommended, since the value can often be used to identify what type it is.
- attribute
useful if the value of the attribute is not of interest.
1.2. Class
A class defines for a collection of objects their structure (attributes), behavior (operations) and relationships (associations and generalization structures).
The class name is a noun in the singular. Thus, it describes a single object of the class. Examples: Employee, Car, Customer.