Friday 6 December 2013

Why Do We Need Object-Oriented Programming?

Object oriented programming is introduced because of so many limitation in procedural language,

Problems with Structured Programming is:


  • In procedural language, When program size is increase then is difficult to handle that program. Reasons behind is that  unrelated functions and data, provide a poor model of the real world. So program size is increase then function(module) is increase and it is difficult to manage whole program.
  • Second thing is Unrestricted Access of data. lets explain that, there are two type of data local and and global data.If I want to restrict access of my data through Local data then nobody can access that data from outside but I want to reuse that data in other function at that time I have to redeclare that data and  dependent code is every time.However, when two or more functions must access the same data—and this is true of the most important data in a program—then the data must be made global. then anybody can access that sensitive data.


so, We need one programming model that solve above problem and mapped with real world for easy to understanding purpose.

No comments:

Post a Comment