Depicting friend relationship between classes in UML

13,469

Yes, that's perfectly valid. For my own questions about UML, I found this website particularly helpful.

Share:
13,469

Related videos on Youtube

Arun
Author by

Arun

Updated on July 06, 2022

Comments

  • Arun
    Arun almost 2 years

    I have two classes A and B where B is a friend of A.

    How to show this in UML ?

    Is it ok to show it using dependency relation and then adding a comment on the relation like below ?

      <<Friend>>
    

    B ------------------> A

    • Jordi Cabot
      Jordi Cabot about 12 years
      What does it mean that a class is a friend of another? The semantics of this "relationship" would influence how it is represented