Reputation: 1
I having problem in reading the syntax in uml diagram:
malls:string[*]
What is the string indicate? How do I write that in variable declaration in C++?
Upvotes: 0
Views: 55
Reputation: 13711
I'm guessing the line you mentioned is actually part of a class deifinition? In that case it is an attribute definition where
malls
is the name of the attributestring
is the type of the attribute[*]
is the multiplicity of the attribute. In this case the single *
is actually short for [0..*]
which means that there will be zero or more strings stored in the attribute malls.There are many ways to implement something like that in code, including using an array of strings, or a list of some kind.
Upvotes: 1