Programming Types
Unstructured Programming:
Non-structured programming is historically the earliest programming paradigm. In earlier days, the computer
program was a long list of commands. The lines were usually numbered or had labels. This allowed the flow of
execution to jump to any line in the program. Code fragments were reused by conditional and unconditional
branching of flow of execution i.e. using many goto statements. As the size of the program grew larger, these
jump statements, created very complex network of loops, producing hardly-readable code, which made it very
difficult to identify and fix the bugs.
Procedural Programming:
The situation was later improved by a technique called procedural programming. The logic of the program or
functionality was broken into small named code fragments performing a specific task called procedures (called
functions, methods or subroutines in other languages). The main program was separated from these procedures.
To write a program the procedures were invoked from the main program. All the data was placed globally in
one location and was accessed by all the procedures. Each procedure may have its own local data.
This procedure has two big advantages. Firstly, it was easy to correct errors. All we have to do is to go to that
procedure which is causing that problem and fix it up. You just have to check a small code fragment. Secondly,
if you find that a procedure is working and is reliable, you may reuse it any number of times.
Though the complexity of the program decreased, by this new technique, there was a problem when size of the
program grew very large. Firstly, there was lot of dependency among existing procedures. Change in one
procedure affected the other. Secondly, the global data modified by one procedure, affected the other procedure
too. It was very difficult to identify which data is used by which procedure. Thirdly, locating a procedure to
make a change was very difficult.
Modular Programming:
The situation was improved a little, by a technique called modular programming in which related procedures
were stored in named modules so that locating and maintaining a procedure becomes easier. Still the same
problem existed as the data was placed globally in one location and there was risk for bad coding. In all the
programming techniques discussed above, there was lack of data security.
Object Oriented Programming:
Finally, there was a revolution in the programming world by immergence of totally a new concept called Object
Oriented Programming. The main objective was to represent this real world into the computers using programs.
In real world, a class defines the properties and behaviour that will be shared by a set of objects. Each object of
a class contains the properties and exhibits the behaviour defined by the class. Thus, a class is a logical
Unstructured Programming:
Non-structured programming is historically the earliest programming paradigm. In earlier days, the computer
program was a long list of commands. The lines were usually numbered or had labels. This allowed the flow of
execution to jump to any line in the program. Code fragments were reused by conditional and unconditional
branching of flow of execution i.e. using many goto statements. As the size of the program grew larger, these
jump statements, created very complex network of loops, producing hardly-readable code, which made it very
difficult to identify and fix the bugs.
Procedural Programming:
The situation was later improved by a technique called procedural programming. The logic of the program or
functionality was broken into small named code fragments performing a specific task called procedures (called
functions, methods or subroutines in other languages). The main program was separated from these procedures.
To write a program the procedures were invoked from the main program. All the data was placed globally in
one location and was accessed by all the procedures. Each procedure may have its own local data.
This procedure has two big advantages. Firstly, it was easy to correct errors. All we have to do is to go to that
procedure which is causing that problem and fix it up. You just have to check a small code fragment. Secondly,
if you find that a procedure is working and is reliable, you may reuse it any number of times.
Though the complexity of the program decreased, by this new technique, there was a problem when size of the
program grew very large. Firstly, there was lot of dependency among existing procedures. Change in one
procedure affected the other. Secondly, the global data modified by one procedure, affected the other procedure
too. It was very difficult to identify which data is used by which procedure. Thirdly, locating a procedure to
make a change was very difficult.
Modular Programming:
The situation was improved a little, by a technique called modular programming in which related procedures
were stored in named modules so that locating and maintaining a procedure becomes easier. Still the same
problem existed as the data was placed globally in one location and there was risk for bad coding. In all the
programming techniques discussed above, there was lack of data security.
Object Oriented Programming:
Finally, there was a revolution in the programming world by immergence of totally a new concept called Object
Oriented Programming. The main objective was to represent this real world into the computers using programs.
In real world, a class defines the properties and behaviour that will be shared by a set of objects. Each object of
a class contains the properties and exhibits the behaviour defined by the class. Thus, a class is a logical