![]() |
![]() |
![]() |
![]() |
![]() |
|
First, you need to define the Weight class as a subclass of the
Magnitude class so that methods, such as max: and
min:, are inherited from the Magnitude class.
The Weight class has but one instance variable, magnitude:
Weight class definition
Magnitude subclass: #Weight
instanceVariableNames: 'magnitude'
classVariableNames: ''
poolDictionaries: ''