开发者

Link objects as fields in UML diagram

I'm trying to generate a diagram for a design document. I've generated a class diagram in 开发者_开发百科VS. At the moment it's just a bunch of unconnected boxes as there isn't any inheritance going on. It feels like it would be more useful if I could show how the objects interact through properties and parameters.

As an example, a Boy class has a method Kiss which takes a Girl object. How can I show that Boy and Girl interact by connecting this in the diagram?

Is there a notation for this in UML? Or is there another type of diagram that shows this? Can I make VS draw this connection for me somehow? Or is this a silly/useless idea?

It just doesn't feel like a proper diagram unless it's got some lines on it somewhere :)


Dependencies other than inheritance is usually generated for links (instances of associations). There two types of associations: composition and aggregation. If your Girl object would be a member of your Boy class you would give VS a change to detect this association.

Maybe this helps UML-Class-Diagram

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜