These are flashcards an notes made by students on topics like 'person', 'collection' and 'set', originating from:

- Michael Jesse Chonoles
ISBN-10 0128096403 ISBN-13 9780128096406
1335 Flashcards & Notes
  • This + 400k other summaries, also in PDF!
  • 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

Study Cards on person, collection, set

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
  • Higher grades + faster learning
  • Don't study anything twice
  • 100% sure, 100% understanding
Discover Study Smart