Instructors' Guide


Introduction Terminology Expressions Control Objects Inheritance Technology Summary

Inheritance

Eiffel supports multiple inheritance. As an example, look at the class FixedList in slide eiffel-inheritance, which is implemented as a combination (by inheritance) of a generic List and a generic Array.

Multiple inheritance

  class Fixed_List[T] export ...
  inherit
  	List[T]
  	Array[T]
  feature
   ...
  end
  

slide: Eiffel -- inheritance

Using (multiple) inheritance implies that a FixedList may be regarded as a subtype of both Array and List. However, the export list in the end determines what interface is provided and hence what type the class embodies.