Fenriswolf
Fenriswolf

Reputation: 45

Get Methods and Class-Relationships in UML-Diagrams

This question is bugging me over and over again and I cannot find a clear answer to it. For most people this should be trivial to answer, so please, could you please help me using UML correctly?

If I have classes A, B and C. An instance of B is a member of A and an instance of C is a member of B. Now B offers a method, which returns its member of Class C and A calls this method in one of his methods and does some actions on it. In UML, is there now a dependency between A and C? Or is it so obvious that the relationship can be ommitted (otherwise the UML diagram could become hard to overlook in no time)? To illustrate the problem, a short sketch of the described situation:

enter image description here

Upvotes: 2

Views: 823

Answers (1)

Kelly S. French
Kelly S. French

Reputation: 12344

The link from A to C is not needed.

The arrows from A to B and B to C show the visibility (or navigation) such that C is visible to B which is itself visible to A, which means that there is an assumed path from A to C and an explicit line does not need to be drawn. Plus, like you say, following that pattern would quickly create an unwieldy diagram.

Upvotes: 2

Related Questions