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?
Report

What is a Set?

A set in UML, and traditionally, disallows duplicates and has no defined order.
Report

Example: In the above examples, the multivalued properties, without further markup, are sets.

No person can be a rider on a specific trip more one than once.

A person cannot marry themselves.

A person cannot be a celebrant ( at a particular marriage more than once.
Report

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 ....?

{ORDERED} or {ISORDERED = TRUE}.
Report

The ordered set collection still does not allow for ....?

The ordered set collection still does not allow for duplicates.
Report

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 ???

The default is {UNIQUE} or {ISUNIQUE = TRUE}.
Report

Can you name an example of the "bag" type in a supermarket?

Consider the items bought on a supermarket-shopping trip.

A person may buy the same item more than once, and the order is not important.

We call this collection type a bag
Report

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
Remember faster, study better. Scientifically proven.
Trustpilot Logo
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart