jeudi 6 juin 2019

Can more than one objects aggregate the same object?

Design Pattern by Gamma et al said

Consider the distinction between object aggregation and acquaintance and how differently they manifest themselves at compile- and run-times.

Aggregation implies that one object owns or is responsible for another object. Generally we speak of an object having or being part of another object. Aggregation implies that an aggregate object and its owner have identical lifetimes.

Acquaintance implies that an object merely knows of another object. Sometimes acquaintance is called "association" or the "using" relationship. Acquainted objects may

Can more than one objects aggregate the same object? If object A aggregate object B, can another object say C also aggregate B?

Can Can more than one objects acquaint the same object? If object A acquaint object B, can another object say C also acquaint B?

Aucun commentaire:

Enregistrer un commentaire