Finishing the Static Model - Associations - Attribute and Role Adornments
7 important questions on Finishing the Static Model - Associations - Attribute and Role Adornments
What does the grey "author" means?
Normally, we do not use both formats for the same property because it can get confusing (and redundant).
What can we see in figure 10.15 ?
A Book has a read-only, ordered set of many authors who are Persons
or
A Book has an ordered set of many Persons in the role of authors
Most everything we can place on a attribute we can place on a ...
In Table 10.2, we show almost all the possible adornments for an Attribute.
So a 0..1 is an optional field, 0 is a field that cannot appear
0..* indicates the notation can appear as often as you need.
The order shown is the approximate order that they can appear.
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
Most everything that we can place on an attribute, we can place on an association end. In Table 10.2, we show almost all the possible adornments for an Attribute.
Compare Table 10.2 with Table 10.3. In Table 10.3, we show the properties that we can assign to an association end
• AggregationKind (normally shown only on an association), which we cover later
• Qualifiers (normally shown only on an association), but are not on the first exam
• Multiplicity brackets (used on attributes but not on an association)
• Default value (normally only on an attribute)
Why would modelers use the association format over the attribute format?
Using the association form is most common when the property is a class (rather than a datatype).
The individual classes (or dataTypes) now can be further connected to classes, and the diagrams indicate a fuller picture of their relationships
You can also add attributes, operations, and receptions to both sides.
What do we see in the figure?
For example:
the Person Class can have a forename, a surname, and a date span
Moreover, a Person Class can have relationships of their own.
See Fig. 10.16. In this example, a Person can also be both a composer of a Score and an author of a Book
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding