Introduction to Programming Languages

The shift in programming language is categorized as following:
 
• Monolithic Programming
• Procedural Programming
• Structural Programming
• Object Oriented Programming 

Monolithic Programming (Assembly language and BASIC) 

This programming consists only global data and sequential code.  Program flow control is achieved through the use of jump and the program code is duplicated each time it is used. Fig 1.1 No subroutine concept is used. Since this programming style is not supporting the concept of data abstraction it is very difficult to maintain or enhance the program code.


Procedural Programming  (FORTRAN and COBOL) 
 
Mainly comprises of algorithms.  Programs were considered as important intermediate points between the problem and the computer in mid 1960s. Subprograms were originally seen as lab or saving devices but very quickly appreciated as a way to abstract program functions as shown in Fig. 1.2

The important features of Procedural Programming are 

• Programs are organized in the form of subroutines and all data items are global
• Program controls are through jumps (goto’s) and call subroutines
• Abstracted subroutines are used to avoid repetition
• Software application is minimized
• Difficult to maintain and enhance the program code 

Structured programming (Pascal and C)
 
Structured programming is evolved as a mechanism to address the growing issues of
programming in the large.  Larger programming projects consist of large
development teams, developing different parts of the same project independently. 
Fig 1.3  Programs consist of multiple and in turn each module has a set of functions
of related types. 

• Structured programming is based upon the algorithm rather than data 
• Programs are divided into individual modules that perform different task. 
• Controls the scope of data
• Support modular programming
• Introduction of user defined data types 

Technically, a structured language permits procedures and functions to be declared inside other procedures or functions, and therefore cannot formally be called a block structured language.
However, it is referred to as structured languages like ALGOL, Pascal and the likes.

Structured programming allows compartmentalization of code and data. This is a distinguishing feature of any structured language. It refers to the ability of a language to section off and hides all information and instructions necessary to perform a specific task from the rest of the program. Code can be compartmentalized in C++ using functions or code blocks. Functions are used to define and code separately, special tasks required in a program. This allows programs to be modular. Code block is a logically connected group of program statements that is treated like a unit 

Object Oriented Programming (C++, Smalltalk, Eiffel, Java etc.)

Approaches to programming have changed dramatically since the invention of computer, primarily to accommodate the complexity of the programs. Object- Oriented Programming is a new way of solving problems with computers.  OOP is designed around the data being operated upon as opposed to the operations themselves. 

The main objective of object-oriented programming is to eliminate some of the flaws encountered in the procedural approach. The object oriented programming has taken the best ideas of structured programming and combined them with several powerful concepts that encourage us to approach the task of programming in a new way.  An object is a combination or collection of data and code designed to emulate a physical or abstract entity. Each object has its own identity and is distinguishable from other objects.