Friday, July 18, 2008

How Object Oriented Programming came into picture

1. Procedural programming: the program is written as a collection of actions (a procedure) that are carried out in sequence, one after the other. The order is important.
----- Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms.
----- At a low level, structured programs are often composed of simple, hierarchical program flow structures. These are regarded as single statements


______________Programming Paradigm
_______________________|
_______________________|___________________
___
|_______________________________________|
Unstructured Programing
________________ structured Programing
___________________________________________|
___________________________________________|_________________

____________________|________________________________________|
___________Procedural Programing ___________________ Object Oriented Programing



1. Unstructured Programing: Most simplest way of doing programing. Just sequence of instructions to be executed to achieve the task.Does not follow any structure(no program structure and no data structure). So there is no methods or procedure in this kind of programing.


2. Structured Programing: This solicites for a breaking the whole task into multiple subset of instruction. This subsets are methods or procedure.

Advantage over
Unstructured Programing:

1. Better Code maintanace
2. Better Reusability of code

3. Object Oriented Programing

Consider all real life entities as objects.
Introduces concepts of class.

Advantage over Unstructured Programing:

1. Better code reusuability
2. Better code maintanence
3. Data Encapsulation
4. Data hiding


Comparision:

Unstructured Programing

Structured Programing

Object Oriented Programing

code reusuability

less

medium

more

code maintanence

Most difficult

medium

Most easier

Data Encapsulation

No

No

Yes

Data hiding

No

No

Yes










No comments: