Similar questions have been asked, but this does not fully address my problem:
I am having problem with the following statement made by my teacher:
- "You can only have in-built or custom-defined data types, as types of attributes in your classes. For other attributes multiplicity defines quantity and whether it is obligatory." (fair enough)
Let's assume the following description:
[...]Each operation holds a sequence of tasks to be executed on a required quality level - for each task there is an associated quality level selected from the list of available quality levels for this task.[...] (Operation holds number of other attributes as well).
Now I have drawn the following "class diagram":
Questions:
Can I have self-defined data types as part of my class diagram (as a class) or can these be used only as attributes within other classes?
If these data types can be used only as attributes, then I do not know how I can mark the fact that the collection is ordered and unique other by adding this attribute to a class - which - according to my teacher - is not allowed - because then I would be having a collection of a type which is neither an in-built type or self-defined type as an attribute.
According to my knowledge adding an attribute to a class and specifying this collection is ordered is the only way of marking such property and cannot be achieved with multiplicity.
Can someone please shed a bit of light on what is the proper notation?