M
M
Mamol272018-04-02 15:32:54
OOP
Mamol27, 2018-04-02 15:32:54

How to correctly display the dependency of two classes on a UML diagram?

Hello, there are basic concepts of building UML diagrams, but I stumbled when creating a class diagram. The essence of the question is class A, it has two functions foo, foo2. There is also a class B, in the constructor of which we specify the parent.
foo and foo2 methods look like this:

foo(){
    B *bar = new B(this);
    ...
    return;
}
foo2(){
    B *bar = new B(this);
    ...
    return;
}

Question: which of the three diagrams is closer to the truth?
5ac222a919c0b525383672.bin5ac222b0bb4c6124894290.bin5ac222b800c90347813325.bin

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question