How can I use UML to model a relationship between two classes, where one has functions exposed as friend to the other?

Posted by user1796528 on Programmers See other posts from Programmers or by user1796528
Published on 2012-11-27T14:03:29Z Indexed on 2012/11/27 17:19 UTC
Read the original article Hit count: 291

Filed under:
|
|

I have a two classes:

  ------------                         ---------------
     X                                       Y
  ------------                         ---------------
                      relation
  ------------    ------------------   ---------------
      A()                                   C()
      B()                             
      D()
      E()
  ------------                         ---------------

I want to inherit just these two functions from X class, where they are defined with the friend access modifier. My class will be:

 ---------------
      Y                                       
 ---------------

 ---------------
    C()
    A()
    D()
 ---------------

Y class uses some functions of X class namely A and D. How can I model this relationship in a UML class diagram?

© Programmers or respective owner

Related posts about c++

Related posts about uml