Question

I was just wondering if it is more correctly to as a label of objects in UML sequence diagram instead of object name (which is irrelevant in my opinion and less informative than class name) provide class name. Another thing, while returning information instead of listing all objects names would it be a better solution to just write collection;

Diagram with object names:alt text http://www.freeimagehosting.net/uploads/934c6a3e87.png

Diagram with class names: alt text http://www.freeimagehosting.net/uploads/a44244eb7c.png

As it's clearly visible from the second diagram that it is much more informative than the first one, and I think it is more practical.

Was it helpful?

Solution

Sequence diagrams always represent interactions between objects. When showing the name of the object you can just use the object name (agreed, not useful in general), the syntax "object:class" (important when you are modeling a specific scenarion in which the name of the object is relevant to understand the scenario) or just " :class" (here you are using an anonymous object to indicate that the scenario applies to all objects of the class).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top