Finishing the Static Model - Multiplicity - Multiplicity Properties and Collection Types
7 important questions on Finishing the Static Model - Multiplicity - Multiplicity Properties and Collection Types
Whenever we have a multivalued item (i.e., whose upper-bound of the multiplicity is greater than one), we have some questions that we may wish to ask.
• Does the sequence of values matter?
• May any of the values be duplicates?
What is a Set?
Example: In the above examples, the multivalued properties, without further markup, are sets.
A person cannot marry themselves.
A person cannot be a celebrant ( at a particular marriage more than once.
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
In a set, there is no first or last or nth position
Though the implementation may be done with an array, technically, you cannot guarantee that any apparent order is repeatable.
If you want a stable order, or if sets are not the best solution for the multivalued property, you must flag the collection as being ....?
The ordered set collection still does not allow for ....?
This restriction is acceptable for the author attribute because the same person cannot appear as an author more than once for a book.
The default is ???
Can you name an example of the "bag" type in a supermarket?
A person may buy the same item more than once, and the order is not important.
We call this collection type a bag
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