To create a part-whole relationship, you probably need:

  • An instance variable from the part to the whole (if the part ever sends messages to the whole.
  • An instance variable that usually holds a collection of the parts.