• Post Reply Bookmark Topic Watch Topic
  • New Topic

UML diagram  RSS feed

 
Mark Miranda
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have two classes:

1. MenuGUI
2. MenuActionListener

How can I show their relationship using a UML Class Diagram?

i'm stuck between what arrow to use.



I've also included a short diagram of two possible links I could use.

Thanks!
UML.png
[Thumbnail for UML.png]
UML
 
Mohamed Sanaulla
Bartender
Posts: 3185
34
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MenuGUI doesn't directly relate to the MenuActionListener. It relates through a button in MenuGUI.
But the button and MenuActionListener have some kind of relationship- JButton contains ActionListener, So its an aggregation between JButton and ActionListener.

But again MenuGUI contains JButton so in turn MenuGUI contains ActionListener - This is somewhat not directly related though. But surely MenuGUI and MenuActionListener are not related via the ---> (which I suppose is for showing a implementation of some interface). You might justify that MenuGUI and MenuActionListener are related via association, which might be correct, but a more specific relation I think would be that of an Aggregation. What do you think?
 
Mark Miranda
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, your point make sense. I think aggregation does sound like a better way of showing their relationship.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!