What does an object represent?
Different individuals in the system, such as, but not exclusively people. Animals, plants and inanimate objects like cars can also be described as objects.
What is the relationship between objects called?
A link. In UML, a normal line is used to show that two objects are linked.
What are the characteristics of an object?
The characteristics of an object include structural characteristics (attributes) and its behavior (its operations).
Can two objects have two different sets of operations?
No, operations are identical for all objects of a class and are therefore usually described exclusively for the class.
Can two objects have the same set of attributes?
No, objects have different attributes from one another, but share the same behavior (operations). If two people share the same name and date of birth, they would have to be represented as two objects, such as maxMiller1 and maxMiller2.
What does multiplicity indicate?
The multiplicity of an attribute indicates how many values an attribute can contain. For example, how many students (objects) can attend a lecture.
What does this multiplicity notation mean? [1..*]
The minimum limit is 1, there is no upper limit
What does {ordered} mean in a class context?
A fixed order of attribute values, for example, an address should follow the order: street, street number, zip code, city, country.
What does {unique} and {non-unique} mean in a class context?
Specifies whether duplicates of attributes are allowed or not. An address, for example, should only be entered once and is therefore unique.
Define how operations are characterized
Operations are characterized by their name, their parameters and the type of their return value.
What does a parameter with an inward direction indicate?
If a parameter has the direction in, this indicates that when the operation is used, a value is expected from this parameter.
What does a parameter with an outward direction indicate?
The specification of the direction out expresses that after the execution of the operation, the parameter has adopted a new value. If an operation should have multiple return values rather than just one, you can express this using multiple parameters with the direction out.
What does a parameter with an inout direction indicate?
This indicates a combined input/output parameter. If no direction is specified, in is the default value.
What is used to realize the important concept of information hiding?
Visibilities such as public, private and protected are used to realize information hiding.
Why is setting the correct visibility for an attribute important?
Setting the correct visibility ensures that unauthorized access of the attribute is not possible.
What does “public visibility” mean? Illustrated via +
Access by objects of any classes is permitted
What does “private visibility” mean? Illustrated via -
Access only within the object itself is permitted
What does “protected visibility” mean? Illustrated via #
Access by objects of the same class and its subclasses is permitted
What does “package visibility” mean? Illustrated via ~
Access by objects whose classes are in the same package is permitted
What is a class variable?
As opposed to instance variables, class variables are only created once per class. They can also be referred to as static attributes or class attributes. One example of a class variable is interest on a bank account. This is set once for all the objects in that class. The current balance of the bank account is in this case an instance variable, since it state changes within objects and is different for different objects.
What is a class operation?
A class operation is a static operation that can be used even if no instance of the corresponding class has been created. For a person class, getting the amount of objects in the class can be accessed via get.PCounter, which is called directly via the class and not via an instance. This would correspond to a static variable called pCounter or person counter.
What is a binary association?
A binary association allows us to associate the instances of two classes with one another. For example, professor and student.
What does the following navigability mean?
A <—–> B
A can access the visible attributes and operations of B and vice versa. The two objects can navigate freely between each other.
What does the following navigability mean?
A x——> B
This is a non-navigable association. A can access visible attributes and operations of B, but B can not access attributes and operations of A.