How to define attribute (in class diagram)as an array of four elements?

2.1k Views Asked by At

How to define attribute (in class diagram)as an array of four elements using Papyrus as a modelling environment?

Does that possible in Papyrus?

Here is the class:

enter image description here

How to edit the properties of attribute in the following properties view to represent an array of four elements??

enter image description here

2

There are 2 best solutions below

2
On

It is much, much more easy.

enter image description here

If these elements belong ONLY here, use composition - filled diamond. If they can exist by themselves, use Aggregation - empty diamond.

0
On

I haven't used Papyrus specifically but you have a field called Multiplicity on the right. Change it to 4 if your array has to always have exactly 4 elements or 0..4 if it can have at most 4 elements.