|
|
|
Dr. Jones can
make several design suggestions even for this seemingly straightforward
refactoring.
|
|
If the method is
polymorphic in the source hierarchy, it’s likely that the programmer will
want to express that polymorphism on the target hierarchy.
|
|
So we leave
to-dos for the programmer to move the overriding and overridden methods to
appropriate places in the target hierarchy.
|
|
Also, if the
method is overloaded with functions of the same name but different
signatures, then the programmer might want to move those as well.
|
|
Finally, if the
method uses fields or methods in the source class, the programmer will need
to provide access to them (I.e., by encapsulating those fields).
|