is there a way to traverse an object to get the parent object data? With \"parent object\" I don\'t mean the parent class, but literally object. Here an example, in a javasc
Passing the parent to the child is the better solution. Though it's a somewhat undesirable symbiotic relationship.
Should B() have any knowledge of the object it's an attribute of? More than likely not. These are only loosely related via composition.
Why does B() need to be an attribute of it's parent? Do you need to have this implementation in B() or should it be part of the parent?