Here's what you need to do to create a part-whole relationship.

In the Part Class

  1. Create a new instance variable that will point to the whole (say, ocean in the LivingOrganism class.)
  2. Create an instance method in the part that will point to the whole:
    connectToOcean: anOcean
       ocean := anOcean
    
  3. Now, whenever the part wants to send a message to the whole, it sends it to that instance variable. ocean moveMe: self x: 4 y: 7

In the Whole Class

  1. Create a new instance variable that will hold the collection of parts (say, occupants in the Ocean class.)
  2. In the initialize method for the instances of the whole class, assign the instance variable to a new collection.
    initialize
    	occupants := OrderedCollection new.
    
  3. Create connect and disconnect methods for adding and removing things from the ordered collection (using add: and remove:ifAbsent:
    addToOcean: aLife
    	occupants add: aLife.
    
    removeFromOcean: aLife
    	occupants remove: aLife ifAbsent: [].
    
  4. Now, to tell each of the parts to do something, walk the ordered collection. occupants do: [:each | each goHome]