OOP is a better way of solving computer problems compared to a procedural programming language such as C. OOP uses classes which contain members (variables) and methods (functions). OOP uses a modular type of programming structure.
OOP is a type of programming in which programmers define not only the data type of a data structure, but also the types of operations that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.
One of the main advantages of object-oriented programming over procedural programming is that they enable programmers to create modules that do not need to be changed when a new type of object is added. A programmer can simply create a new object that inherits many of its features fro existing objects. This makes object-oriented programs easier to modify.
In order to use the OOP paradigm, a programmer can use one of the programming languages such as C++, Java or Smalltalk.
The C++ programming language provides a model of memory and computation that closely matches that of most computers. In addition, it provides powerful and flexible mechanisms for abstraction; that is, language constructs that allow the programmer to introduce and use new types of objects that match the concepts of an application.
Thus, C++ supports styles of programming that rely on fairly direct manipulation of hardware resources to deliver a high degree of efficiency plus higher-level styles of programming that rely on user-defined types to provide a model of data and computation that is closer to a human’s view of the task being performed by a computer. These higher-level styles of programming are often called data abstraction, object-oriented programming, and generic programming.
Features of OOPs are the following:
- Data abstraction
- Message passing
- Multiple Inheritance
In the next tutorial we will discuss about these features.