Difference between sub-object and contained object
问题 What is the difference between a sub-object and a contained object ? For constructing an instance of a class which is derived from another class, first the sub-object has to be created and then the derived object has to be created. Questions: Is it true that derived object contains the sub-object? How can one visualize the difference in the structure of an object a) which contains another object b) which is derived from another class Do the objects in a) and b) have the same structure ? 回答1: