The programmer may find the need to write little bridge programs to link larger portions, after the fact. The result is often termed spaghetti code, because the code is convoluted and tangled. It may be easy for that particular programmer to make corrections or modifications later, but unfortunately, no one else may ever be able to understand the program. This has been a very common occurrence for the past 40 years, and makes maintenance often very difficult. Basic Principles of Object-Oriented Programming OOP avoids this kind of problem by using very practical engineering techniques, much the same way an architect or engineer designs a building or an aircraft.
Encapsulation means that a high degree of functionality is integrated, or bundled, into each object.
Encapsulation makes an object reusable because it is totally self-sufficient. Thus when creating new programs or modifying old ones, it is much easier to link different objects together. Inheritance means that objects within a specific class have the ability to share attributes with each other. Since the important traits have already been built in, using encapsulation, it is much easier for the programmer to create a new program that is similar to an existing one. For example, if the programmer had a highly sophisticated word processing program, he or she could view objects and, examine their encapsulation and inheritance characteristics, select specific objects and build a desktop publishing program with them.