aarthivg
aarthivg
Branch Unspecified
06 May 2012

difference between object oriented and procedure oriented language

what is the difference between object oriented and procedure oriented language
Anoop Kumar

Anoop Kumar

Branch Unspecified
7 years ago
Object oriented : you have some object and how can they interect and what can they do.
procedure language : how a task would be done.
Ex: For credit card transaction program . you have some object like customer, User_bank,Bank institution,merchant, merchant_bank
[​IMG]
In object oriented these objects can perform certain task they are independent of each other.
But in Procedural Programming:
you can have only process how certain task would be performed.
1.payment of customer to his bank.
2.payment of bank to Bank institution
3.payment of bank institution to merchant's bank
4.payment of bank will pay to merchant.

In procedural programming you need to writed 4 payments procedures to perform task. but in object you will have just one payment_method which can by override by object to do things.

main advantage of object oriented is objects are independent of each other.any change in place doesn't reflect the working of other other object.
these can be understand using technical term of object oriented like encapsulation, abstraction, inheritance....
aarthivg

aarthivg

Branch Unspecified
7 years ago
@ ianoop
In object oriented, interaction between task is possible, In procedural programing,a process can do only specified task.
this what I have understood from your reply. Is it rite
Anoop Kumar

Anoop Kumar

Branch Unspecified
7 years ago
interaction between object using messages.
Object do certain task and pass messages (parameter) to other object.
vinci

vinci

Computer Science
7 years ago
yes object communication(message passing) is possible in OOPs . objects communicates via methods .While in procedural langue, procedures transfer information ,display also.hey depends on procedures mostly
Prashant Munshi

Prashant Munshi

Branch Unspecified
6 years ago
aarthivg
what is the difference between object oriented and procedure oriented language
I think the answer is late but still may help many who keep visiting this thread :

"Object Oriented" programming approach was introduced in late 80s but if going on the spiritual lines one should say God, the great engineer who designed this universe had this same approach in designing it; I must say "the world is worth living because it runs the object oriented way" (of course apart from being non-procedural, another aspect of this beautiful world).

Technically, object oriented approach is defined as "encapsulation" of attributes (variables) and methods (programs) which manipulate those variables to produce certain output depending upon which of the methods have been revoked. An example is the need of the order for this definition to make sense to the beginners or juniors.

What do you do when you feel like having a "brick oven pizza" on your lunch? You call a nearby pizza hut service, right? and then you provide the service with the toppings (technically each topping is a variable and you provide a value for it) of your choice and then tell the service the type of pizza you want, in this case "brick oven pizza". Now you know each of those classified pizzas are made in certain way or process (read Method), so technically you invoke the method. And you get the pizza delivered (the output). And so call "pizza hut" an object.

Actually we may use and extend this same example to understand various properties of an "object" like inheritance, polymorphism, overloading etc.

The procedure oriented approach is different in the sense that you stand in the pizza hut kitchen and explain each and every step for making the pizza, for that you need to know how to make pizza, apart from which ingredients to put and every time you like to have the pizza, you may not just order, so isn't it difficult? In programming, the object oriented way has some ready-made objects as "capsulated" units and easy to replace with similar unit (as a unit as far as input and output are same, if pizza hut is closed then try Domino's with same ease), whereas procedural approach will need to make changes to the code of procedure and every other program which depends on it.
Ankita Katdare

Ankita Katdare

Computer Science
6 years ago
Prashant Munshi That was indeed a neat explanation.
Glad to have you here with us. 👍
Sahithi Pallavi

Sahithi Pallavi

Computer Science
6 years ago
The procedure oriented approach is different in the sense that you stand in the pizza hut kitchen and explain each and every step for making the pizza, for that you need to know how to make pizza, apart from which ingredients to put and every time you like to have the pizza, you may not just order, so isn't it difficult? In programming, the object oriented way has some ready-made objects as "capsulated" units and easy to replace with similar unit (as a unit as far as input and output are same, if pizza hut is closed then try Domino's with same ease), whereas procedural approach will need to make changes to the code of procedure and every other program which depends on it.
Awesome Explanation 👍 I'll tell this example if anyone ask me this question 😛

Prashant Munshi - Waiting for more good posts 👍
6 years ago
Woah!!! "brick oven pizza" Where do you frame the examples from man! Awesome! 😀
Prashant Munshi

Prashant Munshi

Branch Unspecified
6 years ago
Praveen-Kumar
Woah!!! "brick oven pizza" Where do you frame the examples from man! Awesome! 😀
Thank you so much for your compliments. I have always believed that the technical implementations are based on models drawn from the real world and nature only. Remember the philosophy of "crazyengineers.com", the god is the greatest engineer? I liked that, so I joined and realizing that everyday. Each of us, as an engineer, is small incarnation of god. You too can do it guys. There's nothing different.

Share this content on your social channels -

Only logged in users can reply.