I am fairly new to UML and I have been wondering how best to represent operations that return collections, for example, an aircraft has multiple seats, therefore there could be a method called getSeats() which would return a collection of Seat objects.
My UML editor allows me to set a return type for a method that is a single object, but I am not sure how to represent a collection of objects.
In many cases, collection return values can be modeled as arrays. Then, you explain in your assignment that you use the convention to model collections as arrays. During development, the actual implementation can then be chosen (array, list, set).
SCJP, SCJD, SCWCD, SCBCD
He's giving us the slip! Quick! Grab this tiny ad!