English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2006-08-03 20:53:43 · 6 answers · asked by Abhi 2 in Computers & Internet Programming & Design

6 answers

I believe your question reads, what are the advantages of Object Oriented Programming over Procedural Programming.

In OOPs data is king, and is the reason why the program exists in the first place, whereas in Procedural world the empasis is on the functions that operate on the data, rather than the data itself.

In OOPs the data and the functions that operate on the data are close-knit. These functions (aka member-functions) allow access to the data with different levels of protection. In Procedual world limited facility is provided to protect data.

Through concepts like inheritence OOPs allows one to easily extend a data-type and provide new/modify existing functionality without having to touch the original code, which is not available in procedural programmes.

Another underrated feature of OOPs is the operator overloading, which keeps the semantics of the problem close to our understanding. This is not possible in Procedural.

2006-08-03 22:59:35 · answer #1 · answered by swami060 3 · 1 0

Ok, more holes in the question to exploit...

YOU CAN WRITE OBJECT ORIENTED C

while it may not truly be an "object" you still have structs and functions that give you the bare essentials to write an "object oriented program"

and the advantages of OOP? heh... it's this and this only, don't let anyone else fool you with their technical answers that come out to just not be true in real world programming because buisiness environments need efficiency and not lah de dah fancy coding schematics... where was i? oh yeah, OOP is a buzzword. When you say it, it makes people happy. Just like saying AJAX, functional requirements, or any other tech phrase that you can think of.

OOP is merely for java programmers, because you can't do anything else. I mean... look at Perl, you can write object oriented programs in it... but nobody does. I mean, who wants to write POOP? ;)

2006-08-04 07:40:13 · answer #2 · answered by Novy 1 · 1 0

First of all, the difference is between the procedural language and object oriented laguage... in a procedural language like C even if u use if ...else or select...case statement the program will do the whole procedure everytime it will be executed.... but in OOPs the procedures, function, variables can be declare or create totally in event driven pattern.. that a way we can make the function or procedures specific for a definite event... when the specific event will fire then only the function (it can be private..means local to the definite event or public or global). so the compilation will take less time... and obviously we can make a variable/ structure/function totally dedicated for a perticular purpose.
It helps us to extend required program body, encapsulation of data, inherit features of an object. what by a procedural language will be much more complex

2006-08-03 21:30:43 · answer #3 · answered by sang_chak 1 · 0 0

In Object Oriented Programming the concept of Objects are used, which means you can group variables and functions into an object (written as a CLASS) versus in C you would have to individually label each member variable so that it's clear they belong to a particular object. In addition for every additional instantiation of the same object OOPs make use of the same CLASS (you can think of it as a template) versus in C you have to declare several new variables or functions that perform the same exact things as the first one. So already you can see (C!) that OOPs allows the reuse of code.

In addition, if you require a new OBJECT that is an improved version of an old OBJECT, you can cut the rework by simply using the concept of INHERITANCE. This new object and INHERIT the variables and functions of the old OBJECT but allows you to still add more to it. Thus cutting down work. In C, you cannot do this.

2006-08-03 21:11:35 · answer #4 · answered by ryanC 2 · 0 0

Data can be divided as public and private also we can provide interface for entering and validating data by means of class properties

Program development becomes easy due to increased modularity.

OOPs is closer to real life representation of the objects which we want to program.

Hierarchical relationships can be represented using inheriatnce.

2006-08-03 21:01:40 · answer #5 · answered by Krishna 3 · 0 0

OOPs has 4 alphabets while C has only 1.

2006-08-03 20:58:30 · answer #6 · answered by Anonymous · 0 1

fedest.com, questions and answers