Aggregating DIAM Classes

i came across this definition

Aggregation has two properties: antisymmetry, transitivity

What does it mean?

thanks

+2


a source to share


1 answer


Aggregation is a type of object composition in which the subject of an object is part of another object. This contrasts with property, where one object belongs to another.

For example, a car is made of many parts - engine, wheels, etc. The parts are aggregated into the vehicle.

But in another example (which I found online), if the Person object has a car, it is not an aggregation. The person owns it, but the car is not part of the person.

An important implication of this distinction is that when an object is destroyed, its aggregated parts must also be destroyed. But the objects he owns, which are not part of him, must remain intact.



So, to the definitions:

Antisymmetry . I haven't been able to find an exact definition, but my intuition tells me that this means that two objects cannot be part of each other. Object A concatenates B, but never accesses at the same time (unless A and B are equal, which is more related to set theory than OOP). My hand is part of me, but I cannot be part of my hand.

Transitivity is like transitivity in mathematics. if A is part of B and B is part of C, then A must be part of C. My hand is part of my hand, my hand is part of me, so my hand is part of me.

+2


a source







All Articles