in Smalltalk a genetic distance between classes (new thing) is the amount of minimal father steps or
Question:
in Smalltalk a genetic distance between classes (new thing) is the amount of minimal father steps or son steps that you need to pass in the tree of inheritance if you start at one class until you reach the second class.
for example: the genetic distance between SmallInteger to Number is 2 and the distance between Point and TranslucentColor is 3. you need to code what is needed in order for the message geneticDistance will be sent to the class with the class argument and will return the genetic distance between the two classes.
in case the receiver of the message or argument or both is not a type of a class or meta class so for classes like these we will calculate the genetic distance from the class of the object. sending each of the following messages will return 2:
SmallInteger geneticDistance: Number 3 geneticDistance: Number Number geneticDistance:3
and the following message will return 4:
4.5 geneticDistance:3
Managerial Accounting A Focus on Ethical Decision Making
ISBN: 978-0324663853
5th edition
Authors: Steve Jackson, Roby Sawyers, Greg Jenkins