Since the invention of the computer, many programming approaches have been tried.
such as
Modular programming
Top down programming
Bottom up programming
Structured programming
The primary motivation in each has been the concern to handle the increasing complexity or programs that are reliable and maintainable.
Structured programmning (C Language) became very popular and was the main technique of the 1980s. This language was a powerful tool that enabled programmers to write moderately complex programs fairly easily. However. as the programs grew larger, even this C language approach failed to show the desired results in terms of bug-free, easy-to-maintain, and reusable program.
Object-Oriented Programming (OOP) is an approach to program organization and development that attempts to eliminate some of the pitfalls of conventional programming methods by incorporating the best of structured programming features with several powerful new concepts. It is a
new way of organizing and developing program and has nothing to with any particular language. However, not all language is are suitable to implement the OOP concepts easily.
Conventional programming, using high level languages such as COBOL, FORTRAN and C, is commonly known as procedure oriented programming (POP).
In the procedure-oriented approach, the problem is viewed as a sequence of things to be done such as reading, calculating and printing.
A number of functions are written to accomplish these tasks.
The technique of hierarchical decomposition has been used to specify tasks to be completed for solving a problem.
Normally, programmer uses a flowchart to organize these actions and represent the flow of control from one action to another.
However, during programming, programmer concentrates on the development of functions and gives very little attention to the data that are being used by various functions.
In a multi function program, many important data items are placed as global so that they may be accessed by all the functions. Each function may have its own local data.
Global data are easily change by a function. In a large program it is very difficult to identify what data is used by which function. In such case there is need to use an external data structure, we also need to monitor all functions that access the data. This provides an opportunity for bugs to creep in.
Another serious drawback with the procedural approach is that it does not model real world problems very well. This is because functions are action- oriented and do not really corresponding to the elements of the problem.
In OOP, data is treated as a critical element in the program development and there is system in which data can not flow freely around the program.
Actually, data are kept more closely to the function that operate on it and protect it from outside function to minimize accidental modification.
OOP allows decomposition of a program into a number of entities called objects instead of functions and building data and functions around these objects.
It is an approach that provides a way of modularizing programs by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand.
Through inheritance, redundant code can be eliminated and extend the use of existing classes which is not possible in procedure oriented approach.
Program can be built from the standard working modules that communicate with one another, rather than having to start writing the code from scratch which happens procedure oriented approach. This leads to saving of development time and higher productivity.
The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.
It is possible to have multiple instances of object to co-exist without any interference.
It is possible to map objects in the problem domain to those in the program.
It is easy to partition the work in a project based on objects.
The data-centered design approach enables us to capture more details of a model in implementable from.
Object oriented systems can be easily upgraded from small to large systems.
Message passing techniques for communication between objects makes the interface descriptions with external systems much simpler.
While Simula is credited as the first object-oriented programming language, the most popular OOP languages are:
C++, Java, Python, Visual Basic .NET, Ruby, Scala, PHP, Curl, Delphi, Eiffel