c++ - How is the correct form to model a reference/pointer to a class in UML? -


you have 2 classes: class , class b.

in order become instance, class b needs have member, object of class a. and, class b has features of class a, excluding functionality allows modify object of class a.

also class b has features, , reason, not make using inheritance because if object of class (that use instance b) changed, therefore values of instance of class b, must changed.

i represent behavior aggregation, there things not sure about. 1 when object of class destroyed, object of class b not (even not make sense object b more, , access of features provoke run time failure).

with meant object of class b references object of class a, , not other way around, in normal aggregation object contain object of class b.

it mean not aggregation composition? if object don't make sense after end of lifecycle of referenced object? or how behavor should model instead?

look here http://en.wikipedia.org/wiki/object_composition#aggregation

aggregation on contary not imply ownership. situation.

what behavior of object after destruction of aggregated object, nothing class diagram.


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -