Recently MeroSpark is lunched with more features and services, now you can ask your question, sell your books, share your notes and many more. Visit now and create your account to take full advantage of MeroSpark.

Difference between Structured and Object Oriented Programming (OOP)

Download our Android App from Google Play Store and start reading Reference Notes Offline.

structured Vs OOPDifference between Structured and Object Oriented Programming (OOP)
Object Oriented Programming (OOP)
Third Semester | Second year
BSc.CSIT | Tribhuvan University (TU)

Structured Vs Object oriented Programming (OOP)
The OOP, can be considered to be a type of structured programming which uses structured programming techniques for program flow, but adds more structure for data to be modeled. We have highlighted some of the basic differences between the two as under:

  • OOP is closer to the phenomena in real world due to the use of objects whereas structured programming is a bit away from the natural way of thinking of human beings.
  • Structured programming is a subset of object-oriented programming. Therefore, OOP can help in developing much larger and complex programs than structured programming.
  • Under structured programming, the focus of a program is on procedures or functions (behavior) and the data is considered separately (data structures are not well organized within the program) whereas in OOP, data (structure) and methods (behavior) both are in collective focus.
  • In OOP, the basic units of manipulation are the objects whereas in case of structured programming, functions or procedures are the basic units of manipulation.
  • The focus of a program is on manipulation of data in structured programming whereas the focus of OOP is on both data (structure and states of objects) as well as on its manipulation (behavior of objects).
  • In OOP, data is hidden within the objects and it manipulation can be strictly controlled whereas in structure programming the data in the form of variables is exposed to unintended manipulation too.
  • The OOP promotes the reuse of classes and their parts of the code too. In addition, it also supports the inheritance of state and behavior. This feature is missing in structured programming.
  • The OOP supports polymorphism of operations.
  • The concepts of OOP have got integrated with most of the prominent object oriented methodologies of software development in a better way and help in reducing the development effort and time as compared with that of structured methodologies based on structured programming.
  • The structured programming normally emphasized on single exit point in their constituent function or procedures. Since each function/procedure allocates some memory to itself for storing the values of its variables and code, before the exit, there must be a provision for deallocating this memory. Otherwise, more and more of the memory gets occupied by each function/procedure and in large programs, there may occur a shortage of memory for use by other function/procedures and the processing can get slower or even completely halted. When in any function/procedure, memory is allocated, but not deallocated, a memory leak is said to have occurred (the memory has leaked out of the computer) in it.
(Visited 7,184 times, 1 visits today)

Posted By : Digvijay | Comment RSS | Category : Third Semester
Tag :

Post a Comment

Your email is never published nor shared. Required fields are marked *


Wordpress DMCA
Community | Toolbar | Android App | Founder/Developer : Hari Prasad Chaudhary | CSIT Portal Manager : Digvijay Chaudhary