Computer programs that perform complicated tasks tend to be very complex themselves. Over the years a number of different forms of programming have emerged with the common goal of simplifying the process of creating and maintaining large computer programs.
The most established such form is called structured programming
is a form of programming in which large, complex tasks are broken into smaller, simpler tasks. You can think of structured programming as a strategy for building a large computer program from a collection of little subprograms.
Depending on the programming language in use, these subprograms may be referred to as
- procedures, or
Structured programming is a subset of procedural programming and is also known as modular programming. A structured programming language consists of a logical programming method that is considered a precursor to object-oriented programming (OOP). Its main purpose to enforce a logical structure on the program being written to make it more efficient and easier to understand and modify.
The structured programming language allows a programmer to code a program by dividing the whole program into smaller units or modules. Structured programming is not suitable for the development of large systems and does not allow re-usability of written code the way an object oriented language does. It is a programming paradigm aimed at improving the quality, clarity, and access time of a computer program by the use of subroutines, block structures, for and while loops.
Within the subprograms that make up a structured program
the following control flow constructs are used:
Structured programming: A form of programming in which large, complex tasks are broken into smaller, simpler tasks.
These constructs allow you to produce well-organized programs in which the program logic is easy for you and other programmers to understand.
We will be looking at these control flow constructs in some detail in the lessons ahead, but first, to help you appreciate the benefits of structured
programming, it is instructive to consider a program that is not structured. In the next lesson we will do exactly that.