Procedure versus Object-Oriented Programming
Program and data are the two major elements of any programming language. Data plays an important role and it could exist without a program, but a program has no significance without data. A conventional high-level languages stress on the algorithms used to solve a problem. The Complex procedures have been simplified through structured programming. There are two paradigms in which given how a program is constructed. The first way is known as the process-oriented model. This approach characterizes a program as a series of linear steps. The process-oriented model can be taught of as code acting on data. Procedural languages are also known as Function oriented programming. The second approach is known as object-oriented programming. That organizes a program around its data and a set of well-defined interfaces to that data. An object-oriented program could be distinguishing data controlling access to code.
Procedural Programming
As like Function oriented programming, Object oriented programming emphasizes on the data rather than algorithm. Within Object oriented programming, data is encapsulated or compartmentalized with the related functions and this compartment is known as an object. Within OO approach the problem is dividing into objects, while in FOP the problem is separates into functions. OOP holds FOP and so OOP could be referred to as the super set of FOP.
OOP uses objects and not algorithms as its fundamental building blocks. Every object is an instance of some class. A Class allows the mechanism of data abstraction for making new data types. Inheritance permits building of new classes from the existing class.
Unlike traditional languages OO languages allow localization of data and code and restrict other objects from referring to its local region. OOP is centered on the concepts of objects, abstract data types, encapsulation, polymorphism, inheritance, and message-based communication. An OO language views the data and its associated set of functions as an object and treats this combination as a single entity. Therefore, an object is visualized as a combination of data and functions that manipulate them. In During the execution of a program, an object interacts within each other through sending messages and receiving responses.