Introduction to OOP: Chapter 11: Replacement and Refinement [next] [previous] [audio] [real] [text]

Replacement Example - sqrt in Smalltalk

Class Float replaces the method for square root.

picture of smalltalk number hierarchy

If not replaced (for example, for integers) then the method in class Number is used.

Intro OOP, Chapter 11, Slide 4