posted 13 years ago
I have an object orientation question, which I'm not sure there really is a good general answer to (and which nobody may care about!). But here goes, when creating an object that will be contained by another object, what is the best way to create the inner object? Should you create the inner object outside the containing object and use a setObject method to place it in the containing object, or create it from within the container object(after passing in any data necessary for the creation)? Obviously this could often be situation dependent, but does anyone have an opinion as to a general preferred method?
Thanks
Dave