Search code examples
umlclass-diagram

How can I represent an attribute which is a multidimensional array in UML?


I am designing a new project in UML and I need a multidimensional array as attribute of one of my classes (Figure below)

Example of class with multidimensional array as attribute

Right now I have put List of List to make everyone understand which are my purposes, but this is incorrect in standard UML. What should I do?

Thank you for your help!


Solution

  • This is not illegal, though a bit language specific. Obviously it's plain text (since there's a superfluous ")" inside the expression). If you want to make this language independent you can design it this way:

    enter image description here

    Note that the dot says the role is an owned attribute in the class on the other side. So I also pulled out the conditions and put it in an association to String.