association, aggregation and composition
I want to get the illustration for above three with simple classes. I read a lot from internet. The conclusion is as-
In aggregation people say-
"Class A contains collection of another Class (say B) and if A is destroyed it will not affect its child that is collection will not be destroyed." How is it possible if one object is destroyed but its property can still exist or what they mean by this.(Am I misinterpreting something)
Class A
{
List<B> lst;
}
Class B
{
}