Home computickets UML: The difference between black and white rhombuses while inheriting class in...

UML: The difference between black and white rhombuses while inheriting class in charts

Author

Date

Category

Tell me, please, what is the difference between black and white rhombuses while inheriting a class in the UML charts?

alt


Answer 1, Authority 100%

Increased rhombus – the ratio of aggregation. Aggregation is a whole part ratio.

  • Aggregate (MyEntyClass ) can exist as independently of parts (MyClass ), and with them;
  • parts may exist independently of the unit
  • Aggregate is in a sense incomplete in the absence of parts
  • parts can belong to several units

Flavored rhombus composition. The composition is a strict form of aggregation.

  • at the same time part (myclass2 ) can belong only to one composite (MyEntyClass ) – Unable to own parties.
  • composite has an exceptional responsibility for all its parts; This means that he is responsible for their creation and destruction
  • Composite can release parts by passing responsibility for them to another object
  • In the case of the destruction of the composite, he must destroy all its parts or transfer responsibility for them to another object.

The key difference between the composition and aggregation is that in the compositions in parts there are no independent life beyond the whole (composite), moreover, each part belongs to a maximum of one and only one whole (composite), whereas with aggregation part can be shared in several integers (aggregates).

d. Arlow, A. Neesteadt – “UML2 and a unified process”

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions