As programs go even larger or more complex, the structured programming approach begins to show signs of strength.
Horror stories can be heard in such cases saying like a project is too complex, the schedule slips, more programs are needed to complete the project, complexity increases, cost increases, etc.
The unrestricted access to global data, i.e let us say all functions use integer type as global data. If it is necessary to change the integer into long integer then the problem occurs.
A change made in global data items may require re-writing all the functions that access that data item.
Real-world modeling, In the physical world we deal with objects such as people, cars, etc. such objects are not as data and functions. Real-world objects have both attributes and behavior, i.e eye color, job title, no. of doors in a car, tall, short, etc are the examples of attributes.
As it turns out attributes in the real world are equivalent to data in a program, Behaviour is something a real-world object does in response to some stimulus, i.e laughing, moving, applying the banks, etc. The behavior is represented by a function.
Lack of Encapsulation, Encapsulation is the mechanism to hide the complexity of the program or it will protect from unauthorized access to the user. This is the mechanism to protect the data from losing. But while the encapsulation concept is a powerful working tool, its lack of availability in structured programming means that programs will be longer.
The same or similar code will appear in more than one location. This also means that the programs will have a greater chance of errors. The testing will be lengthy as well since every piece of code will have to be tested. Even if the code is without errors in one place, the same piece of code may appear in a different part of the program and could have problems there.
Same Code Repetition, The common problem is the code repetition, they’re the same code that may be repeated. Because the code that is written may appear in different parts of the program, it can be vulnerable to different problems because of its location.
Programs have variables, which means that they can take on different values in different parts of the program. So the testing that is necessary to develop an error-free program can be time-consuming.