I was having a quiz in class, and one of the questions asserted that an object in Python cannot contain other objects in itself, any objects. It does not make sense, since what is the problem with having a class table, and a class house, when a house is instantiated, its constructor creates an object table as its private variable. Doesn't it mean that an object can contain other objects or am I missing something?
TIA!
The question (says C is incorrect):
Which of the following statements are correct?
- A: A reference variable is an object.
- B: A reference variable refers to an object.
- C: An object may contain other objects.
- D: An object can contain the references to other objects.