0

For example let's say we have a class called "Secretary" and another class called "Utils"

Utils has some functions that do general stuff, for example finding the maximum of 3 integers.

"Secretary" needs to call some of these functions and in this class these functions are called using the following notation:

Utils.function()

now my question is, what kind of association, if there is any, exists between these two classes?

Jas
  • 15
  • 2
  • I don't think you would put such a thing in UML, but my UML knowledge is a bit fuzzy, so I'll leave answering to someone who really knows and doesn't just think. – Jasper Apr 20 '12 at 20:58
  • Thanks, I think I don't need to include that information as well. However I'm not 100% certain about it. – Jas Apr 20 '12 at 21:02
  • There is a huge difference in what you can do in UML and what you "need to include". You are best off asking the person you are making the UML, even if you can't officially express it in UML, that person may want you to show it somehow, and in reverse, if you can express it in UML, he or she may not deem it necessary. – Jasper Apr 20 '12 at 21:05

1 Answers1

0

Most likely Dependency. Associations are normally used to capture some relationship that has meaningful semantics in a domain. So, for example, Secretary 'works for' Manager. Your example is different: you're not capturing meaningful relationships among instances. Therefore Dependency is probably most appropriate.

More importantly though: what are you trying to illustrate? Remember to use UML like any other tool - make it work for you. So, for example, it's fine to show a binary association if (a) it helps you and/or (b) it helps you communicate with other team members. The fact that it doesn't comply with the intended UML usage doesn't matter - as long as you find it useful.

hth.

sfinnie
  • 9,854
  • 1
  • 38
  • 44