Home Segments Index Top Previous Next

553: Mainline

The proper approach is to define printOn:, rather than printString, for the Weight class, because the printOn: method not only helps printString to produce strings, but also helps other methods. Defining printString would fail to bring the behavior of those other methods into a state that is consistent with the behavior exhibited by the newly defined printString.