Reputation: 47
Just wonering how would one represent an array as a state & return from a method in a UML diagram, here is what I'm doing right now:
- arr : String[16]
+ getArr() : String[16]
is this correct?
Upvotes: 0
Views: 2799
Reputation: 4821
Holding that arr
is a private non-static variable and GetArray()
is a public non-static method, I would say this will suffice (different teams have different ways of documenting so this is an opinion). Some people don't include the array length in the class diagram, some do (that is your call). If your method has paramaters, I recommended you do something like this:
getArray([in] param1 : dataType, [out] return1 : dataType)
Upvotes: 1