Search code examples
umlclass-diagram

Drawing UML Diagrams with many variables


Can I know any other way of representing Variables in UML other than variablename:type. Since my class has a huge number of Variables.


Solution

  • Here are two ways of representing class attributes in a UML (2.5) class diagram:

    1:

    enter image description here

    2:

    enter image description here

    Note:

    It is not mandatory to show all class attributes in a class digram. You could, for example, show the public attributes only and hide the rest. Think about for whom you are drawing this diagram. Which attributes are shown depends on the target reader.

    But, if your class has a huge number of attributes and want to show them all, then it is going to be a huge class diagram.