The difference between procedural and object-oriented programming
Object-oriented programming is a programming language model organized around objects rather than actions and data rather than logic. The first step in OOP is to identify all the objects you want to manipulate and how they relate to each other, an exercise often known as data modeling. Once you have identified an object, you generalize it as a class of objects and define the kind of data it contains and any logic sequences that can manipulate it. Each distinct logic sequence is known as a method. A real instance of a class is called an object or an instance of a class.
The focus of procedural programming is to break down a programming task into a collection of data structures and subroutines, whereas in object oriented programming it is to break down a programming task into objects. Either method can be valid for accomplishing a specific programming task.
Procedural programming is used on lower levels of operating system (OS) (kernel, drivers, modules), and higher levels of OS and additional applications (tools) are here to give us advantages of object programming.
Appearance of complex object code, compared to procedural code, is much easier to read and memorize and it is easy to be inherited to create class inside class. Also, object-oriented programming easily discerns between data and program procedures.
Because OOP uses polymorphism it is easier to use the same functions/methods in different environments. Two classes that inherit one base class can have a method which both subclasses override in their own way. For example, if we have a base class Animal with method speak(), and two subclasses Dog and Pig which override it with bark() and oink() representatively, when we call an object instance method speak(), it will call the method bark() if the object is a dog, and method oink() if the object is a pig.(This is a typical and classic example found in Deitel Book). This will happen without using any conditional functions as we would have to do in procedural programming languages. This is very useful if we are working within complex systems and in multi-developer environments.