Last updated on June 13th, 2020 at 08:35 pm
Problems of POP:
It is true that the programs created using POP can be extremely efficient and high-performance, but the main problem is the maintenance. Some other problems includes the followings,
- Insecure data, if we declare a variable before main function then it can be accessed freely from any function present in the program.
- No better memory management.
- Difficult to implement today’s client requirements.
- No structure or code reusability. Hence time of development, testing and length of program increases.
- As length of application increases it causes slow performance.
- No proper way method for Exception handling.
Solution to Problems of POP in OOP:
The OOP is newer than POP. So OOP has came with the solution to most the problems found in POP. Such as,
- Data in OOP is secured as they under cover of classes and their usage by functions can be authorized.
- OOP emphasizes abstract relationships and a ladder of related functionality where similar functionality can all share a common core, making maintenance much easier.
- As similar functions will use a core thus the length of code will reduce.
- Code reuse is increased as well, as one can easily adapt the abstracted base functionality for new tasks.
- OOP also can aid in large-scale program design, helping encapsulate and categorize the different sets of functionality required by each part of the system.