Suppose I have a hierarchy like this:
Object subclass: #ClassA
ClassA subclass: #ClassB
ClassB subclass: #ClassC1
ClassB subclass: #ClassC2
ClassA is just an abstract parent with the common functionality for the
other classes. Same for ClassB.
Only objects from ClassC1 and ClassC2 are to be created.
Should I create a "descriptionName" method in the class side of ClassA
to be inherited for ClassC1 and ClassC2 or should I create a
"descriptionName" once for each of ClassC1, ClassC2.
The same question about the inst vars for ClassB.
Summary, when you have a previously created hierarchy of classes and you
are trying to refactor code (deleting duplicated code and replace it
with magritte) how should you proceed?
It is valid to inherit the descriptions of parent classes?
What if for ClassC1 name should be displayed as 'Name' and for ClassC2
should be displayed 'Title'?
Show replies by date