structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures, for and while loops—in contrast to using simple tests and jumps such as the go to statement which could lead to "spaghetti code" causing difficulty to both follow and maintain.
It emerged in the late 1950s with the appearance of the ALGOL 58 and ALGOL 60 programming languages,[1] with the latter including support for block structures. Contributing factors to its popularity and widespread acceptance, at first in academia and later among practitioners, include the discovery of what is now known as the structured program theorem in 1966,[2] and the publication of the influential "Go To Statement Considered Harmful" open letter in 1968 by Dutch computer scientist Edsger W. Dijkstra, who coined the term "structured programming".[3]
Advantages
of Structured Programming
- Complexity can be reduced using the concepts of divide and conquer.
- Logical structures ensure clear flow of control.
- Increase in productivity by allowing multiple programmers to work on different parts of the project independently at the same time.
- Modules can be re-used many times, thus it saves time, reduces complexity and increase reliability.
- Easier to update/fix the program by replacing individual modules rather than larger amount of code.
- Ability to either eliminate or at least reduce the necessity of employing GOTO statement.
- Application programs are easier to read and understand.
- Application programs are less likely to contain logic errors.
- Errors are more easily found.
- Higher productivity during application program development.
- Improved application program design.
- Application programs are more easily maintained.
Disadvantages
of Structured Programming
- Since Goto statement is not used, the structure of the program needs to be planned meticulously.
- Lack of encapsulation
- Same code repetition
- Lack of information hiding.
- Change of even a single data structure in a program necessitates changes at many places throughout it, and hence the changes becomes very difficult to track even in a reasonable sized program.
- Not much reusability of code.
- Can support the software development projects easily up to a certain level of complexity. If complexity of the project goes beyond a limit, it becomes difficult to manage.
No comments:
Post a Comment