Due to the integrity and encapsulation of objects in object-oriented programs, as well as the relatively loose relationships between objects, it provides extremely favorable conditions and environment for software reuse. Specifically manifested in three levels: class instances, class inheritance, and form or project reuse.
An object is an application independent, tightly encapsulated module. Classes, as abstractions of objects, can be designed, developed, tested, and described as standard blocks independent of the application environment, and can be sold in the market for use in many application environments.
Generating objects from classes is the main aspect of software reuse. All classes not only have a complete system that can meet the needs of various programs, but also have been carefully designed and rigorously tested, and are often placed in the integrated environment of program design in the form of icons. Utilizing these components means leveraging existing achievements to make program design "stand on the shoulders of giants", not only fast and high-quality, but also reliable in operation. Unlike writing dry code in traditional programs, the object-oriented and visual design process has become a pleasure.
A new class can be extended based on the existing class. A new class is derived from a class with similar functionality, simply defining the added data and methods, and the rest will automatically inherit. Inheritance here is a form of reuse. Of course, creating new classes is not something that needs to be done frequently. It is only necessary to develop new classes when suitable classes cannot be found in the library, or when it is often necessary to add the same data and methods to the classes to meet the needs.
The reuse of forms or projects refers to the reuse of partial designs. A template form already includes several objects, and programmers can modify and extend new objects on it. Programmers can also keep their own forms as templates at any time for reuse in future designs.