T
T
Therapyx2016-04-18 13:25:53
C++ / C#
Therapyx, 2016-04-18 13:25:53

A couple of questions about this UML diagram?

Hello everyone, since I’m getting ahead of the program (I want to do all the labs and forget about it before the exam :) there are some questions that I still couldn’t find on the Internet, maybe there is a person who will clarify some points in this diagram. (the most important thing is of course the rhombus in the upper part, where the aggregation is on the other, what's the difference?
As I understand it, in the CellPhone class you need to include SimCard, and from the side of the SIM card, it turns out that it should also know CellPhone, but if you make an inclusive from both sides, then it won’t work out like that, in general, how should I make a connection using the example of c ++ code in this situation?)
Still here in the sim card, the function getCall (src: const SimCard *) - what does it mean in terms of code when the function goes to Obiet of his own class?
5f91fd44c41d4b9fac24818c050add36.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AtomKrieg, 2016-04-18
@Therapyx

but if you make an iklyud on both sides, then it won’t work like that

It will, since both classes contain pointers (marked with an asterisk).
The class is the same, the objects are different. "Simcard" class, "Ivanov's simcard" and "Petrov's simcard" objects. "Ivanov calls Petrov." Oh yes, the object is still constant, which means that no values ​​in it will change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question