sometimes you will see 2 classes are too close, spend too much time exploring each other's private components. You can use move method (shift function) and move field (moving fields) helps them draw a line. You can also see if you can use change bidirectional Association to unidirectional (Change bidirectional Association to unidirectional Association) disconnects one class from the other. If the 2 classes are really intended, you can use extract class (refining class) extract 2 people in common to a safe place, so that they can use this new class openly. Alternatively, you can use hide DeleGate to hide the delegate relationship) let another class share their thoughts.
Inheritance often leads to excessive intimacy, because subclass's understanding of superclasses always exceeds the latter's subjective desire. If you think it is time to let the child live alone, please useReplace inheritance with Delegation(Replace inheritance with delegation)Let it leave the inheritance relationship.