Use different kinds of balls (e.g., football, baseball, basketball, small rubber ball) to introduce inheritance hierarchies visually.

  • Ask students questions about what the balls have in common, and what they expect the ball to do. This can demonstrate parent classes (ball) and base classes (football, baseball, etc)
  • You can also use a variety of toy vehicles for this activity such as a toy boat, motorcycle, car, and truck. Try to get the students to come up with a vehicle class.

More about this tip

External Source

Interview with Barbara Ericson