开发者

Add list type to association

I am using the eUML2 (Free version) plugin to draw a UML class diagram. Now, let's assume I have a class Person and a class Car. I want the class Person t开发者_如何学运维o have a member cars which is a List<Car>, i.e. private List<Car> cars = null.

My question is how do I include this information in the class diagram? To be more precise, how do I include the type information for the List in the eUML2 association?

Regards


You create another Class called Car and then create a directed association from Person to Car with 1-many multiplicity and "cars" as the role name for association end. You can even over do it ;-) by specifying constraints like "{ordered insertion}" to the association. ordered because it is a List and insertion because List maintains insertion order. If you were using TreeSet then it would have been "{ordered natural}".


This eUML tool is full of bugs and a mediocre copy of EclipseUML. Don't spend too much time with this tool because it is a waste of time. I did try this tool because it was free but was very disappointed. The most annoying is that I have asked a question on their forum and they never even answered because I am not a paid customer !!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜