Disclaimer :
This is an educational material collected from internet, from different blogs/links/materials. Displaying credits is difficult as it was not directly copied from a website and put on this blog, instead it was noted down on paper several years ago and several years later being digitized.
OOP : Object Oriented Programming basic concepts and all one should know
Some History for name sake
POP :Procedure-Oriented Programming
Drawbacks
This is an educational material collected from internet, from different blogs/links/materials. Displaying credits is difficult as it was not directly copied from a website and put on this blog, instead it was noted down on paper several years ago and several years later being digitized.
OOP : Object Oriented Programming basic concepts and all one should know
Some History for name sake
POP :Procedure-Oriented Programming
- Problem is viewed as a sequence of things that needs to be done to achieve any goal.
- Procedure oriented programming basically consists of writing a list of instructions for the computer to follow, and organizing these instructions into groups known as functions.
Some Characteristics exhibited by procedure-oriented programming are:
- Emphasis is on doing things (algorithms).
- Large programs are divided into smaller programs known as functions.
- Most of the functions share global data.
- Data move openly around the system from function to function (using global variable).
- Functions transform data from one form to another.
- Employs top-down approach in program design
Drawbacks
- In a multi-function program, many important data items are placed as global so that they may be accessed by all the functions. Global variables are always confusing and prone to change by function accessing it.
- Another serious drawback with the procedural approach is that we do not model realworld problems very well. This is because functions are action-oriented and do not really corresponding to the element of the problem.
Object Oriented Paradigm
- OOP treats data as critical element and does not allow to flow freely around the system.
- Ties data closely to the function operating it, and protects accidental modifications.
- OOP allows decomposition of problems into number of smaller entities called "object" and builds data and function around this objects.
- The data of an object can be accessed only by the function associated with that object. However, function of one object can access the function of other objects.
Some of the features of object oriented programming are:
- Emphasis is on data rather than procedure.
- Programs are divided into what are known as objects.
- Data structures are designed such that they characterize the objects.
- Functions that operate on the data of an object are ties together in the data structure.
- Data is hidden and cannot be accessed by external function.
- Objects may communicate with each other through function.
- New data and functions can be easily added whenever necessary.
- Follows bottom up approach in program design.
No comments:
Post a Comment