0

I’m sorry if the title is not clear enough. FYI, I’m trying to make an UML diagram from a class. Here’s a snippet of the class:

class ItemDisplay {
    Item currentItem;
    Item[] suggestedItems;
    Item[] randomlySelectedItems;
}

How do I have to draw the associations of this class? Should I draw 3 separate associations with the same classes or just one but many multiplicities?

Thanks.

1 Answers1

2

You should draw three associations.

Multiplicities is for one member to define a collection (array, list...).

So here you have two with multiplicity 0..*.

Here are some tutorials:

UML association multiplicity

UML Class Relationships

UML Association vs Aggregation vs Composition

UML Class Diagrams Reference

UML Class Diagrams: Guidelines

Defining Classes and Class Relationships

UML Tutotrial

The Unified Modeling Language Reference Manual

  • Got it. I was confused since all the sources and tutorials that I’ve read doesn’t have any example on when there are multiple associations like the one I’ve quoted here. Thanks a lot. – Bawenang Rukmoko Pardian Putra Oct 08 '19 at 12:22
  • 1
    I updated the answer with some links. I hope they will help you. Have a good reading. –  Oct 08 '19 at 12:32