Structural or Procedural Programming |
Object Oriented Programming |
The principle ideas behind structural programming are as simple as the idea of divide and conquer. |
An object-oriented program may be viewed as a collection of interacting objects. |
It is not a successful approach for dealing with complex problems. |
It is a successful approach for dealing with complex problems. |
Focus is on algorithm and control flow. |
Focus is on object model. |
Structured programming language can view data and function as separate entities. |
Object oriented language view as data and functions as single entity by using class feature. |
Top-to-Bottom approach is used. |
Bottom-Up approach is used. |
It splits the task into modular forms. This makes the program simpler and easier to read with less lines and codes. |
It splits the program into objects that can be reused into other programs. |
Functions are dependent and hence reusability is not possible. |
Functions are independent and hence reusability is possible. |
It is more concerned with the processing of procedures and functions. |
It is concerned to develop an application based on real time. |
In this approach data is not hidden from the external environment. |
In this approach data is encapsulated (hidden) from the external environment. |
In this most functions share global data i.e. data move freely around the system from function to function. |
In this mostly the data is private and only functions inside the object can access the data. |
There is no access specifier. |
There are public, private and protected access specifiers. |
Operators cannot be overloaded. |
Operators can be overloaded. |
It simply passes values to the functions. |
The objects communicate with each other via message passing. |
It is simply traditional way of calling functions and returning values. |
It includes inheritance, encapsulation and data abstraction, late binding, polymorphism and message passing. |
Examples of structural programming language include C, Pearl, BASIC etc. |
Examples of object programming language includes C++, Java, VB.NET etc. |
No comments:
Post a Comment