Overloading, overriding, refactoring

xiaoxiao2021-03-06  47

I think overload and resets are for methods, while reconstruction is for components or classes or throughout the system.

Overloading and reset are an embodiment of object-oriented polymorphism. Overloading means that a method can have a variety of forms. A variety of forms can have different parameter type sequences or different parameters. I personally think this is an object-oriented man-oriented manifestation because everyone may have different input habits. A power pack can be overloaded in an instructions. The function of the power pack (like a method) is to provide a power supply. There are both 2 holes on the board, and there are 3 wells (than the overloader of the method, there are various presented forms), which is for 2 feet, respectively. Plugs and 3-well plugs made. Reset is the overwritten of the generalization method for inheriting from the base class, also covered. This is easy to understand, because even if the base class and the generalization class are similar, the method of the base class is definitely not suitable for generalization, and this is the need to reset the method of the base class. The type, quantity and order of the method parameters, the number, and the order of the basic class, otherwise it will become overloaded.

Reconstructions generally have software reconstruction and code reconstruction. Software Reconstruction refers to the transformation of software without changing the software and external visibility, and its purpose is to improve software structure, improve clarity, scalability, and reusability. Code reconstruction is the modification of the source code that does not change the external situation of the code. Reconstruction is important in code maintenance, but does not increase new behavior. Reconstructing the structure and design of the readability and changing code for increasing code, so it is easier to maintain in the future. If it is difficult to give a component or add a new behavior under the existing structure or it is impossible, this is a need to reconstruct this component or class, and its purpose is to add new behavior easier.

The above is a little bit of my own, there is anything wrong with you, I hope everyone criticizes.

转载请注明原文地址:https://www.9cbs.com/read-68157.html

New Post(0)