xjv
xjv

Reputation: 1

How to include methods from private classes in a communication diagram UML?

I'm wondering how does one include methods from private classes in a communication diagram UML? Do you only include the method even though it's from a private class or do you include the method and make some sort of note that the method is from a private class?

Upvotes: -3

Views: 308

Answers (2)

qwerty_so
qwerty_so

Reputation: 36313

All communication diagram (SD and AD) show the source of the message as the object itself and never the method from where the message is sent. You see only the methods that are called. And those are always public.

Upvotes: 0

Bruce
Bruce

Reputation: 2310

Communication diagrams generally do not show public vs. private. If you want, I suppose you could add a stereotype <> to the class name to that effect. In the class diagram, nested private classes will be displayed using visibility marks. I think both diagrams are important for conveying your intent.

See: http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/ and http://www.holub.com/goodies/uml/index.html

Upvotes: 1

Related Questions