Introduction To C++

C++ is an object oriented programming language that allows programmers to build large and complex applications in a useful and efficient way. It enables the programmers to improve the quality of code produced, thus making reusable code easier to write. C++ is one of the universal language that is used by programmers around the world. It is used for making real world applications. It is key to increase productivity and improve reliability for making complex applications. It is a flexible language that helps the programmer to write the bug free programs which are easier to maintain.


HISTORY OF C++

C++ was developed by Bjarne Stroustrup at AT & T Bell Laboratories in Muarry Hill, New Jersey (USA) in 1983. The version 1.0 of C++ became commercially available in 1983, version 2.0 in 1989 and version 3.0 in 1992. Before the evolution of Object Oriented Language C++, many other Object Oriented Languages existed. One of the earliest Object Oriented Language that existed was Simula 67 which was developed in Norway in 1968. The Object Oriented Languages which existed before C++ were slow and inefficient.

So, Bjarne Stroutstrup who was a great admirer and the master of C and SIMULA 67 combined the features of the both languages into more powerful language that could support the concepts of the object oriented programming and still could retain the features of C. This combination of features of SIMULA 67 and C resulted in the development of a new language called C with Classes by Bjarne Stroutstrup in 1979. C with Classes lacked some Object Oriented features like operator overloading, virtual functions, references etc. Therefore later on some ideas were borrowed from ALGOL 68 (Algorithm Language) programming language which were then combined with language C with Classes that resulted in the formation of Object Oriented Language C++. The name C++ is credited to Rick Mascitti who suggested this name and was first used in 1983.

The name signifies the evolutionary nature of the changes from C. It is named C++ not C+ or ++C because C+ has been used as the name of an earlier unrelated language and C++ is more commonly used than ++C.

Moreover, the language is not called because it is an extension of C language as in addition to existing features of C language, new features were added to remove the existing problems. So it is names as C++.

EVOLUTION OF OBJECT ORIENTED PROGRAMMING APPROACH 

The Object Oriented Programming approach is now a days the most commonly used approach for designing large and complex real world applications. Before the evolution of this approach, many programming approaches existed which had many shortcomings that led to the development of the Object Oriented Programming approach.



Programming approaches have been passing through the revolutionary phases just like computer hardwares. Initially for designing small and simple programs, the machine level language was being used. Next came the assembly language which was used for writing the larger programs comparitively. Both these approaches were machine dependent. Next came the development of the Procedural Programming approach that enabled us to write large programs that contain several hundred lines of code. Then in 1970, a new programming approach called structured programming approach was developed for designing medium sized applications. The eighties saw that the size of applications kept on increasing and with more developers working on the same applications, there was a need of paradigm shift in the programming approaches. As the previous approaches failed in designing such large and complex applications and to allow more complex programs to be written, a new approach known as Object Oriented Approach was invented. Object Oriented Programming approach can be defined as a way by which a computer program is designed and written around objects. 

The various categories of Programming approaches are classified as follows :-
  • Monolithic Programming Approach
  • Procedural Programming Approach
  • Structured Programming Approach
  • Object Oriented Programming Approach

In Monolithic Programming Approach, the program consists of sequence of statements that modify data which is global throughout the whole program. The program control is achieved through the use of jumps and code is duplicated each time as there is no support for the function. This duplication of code is the main disadvantage of this approach. Moreover, data is not fully protected as it can be accessed from any portion of the program. So, this methodology is useful for developing the simple and small programs. The Programming languages like ASSEMBLY and BASIC follow this approach.

Procedural Programming Approach is a top down approach in which a program is divided into functions that perform a specific task and also provide a clearly defined interface to other functions in the program. Data is global and all the functions can access the global data. In this approach, emphasis is laid more on function rather than data. Program flow control is achieved through the use of jumps (GOTO statements) and function calls. This approach avoids the repetition of code which is the main drawback of the monlithic programming. The basic drawback of the procedural programming approach is that data is not secured as it can be accessible by all the functions. This approach is mainly used for medium sized applications. But while developing large programs, a mass of tangled jumps and conditional branching made the program virtually impossible to understand and consumed a lot of development time. The programming languages like FORTRAN  and COBOL follow this approach.

In Structured Programming Approach, a program is divided into functions and modules. Each module has a set of related functions. The use of modules and functions make the program more comprehensible. It helps to write the cleaner code and maintain control over each function. It also introduces the concept of user-defined datatypes and support modular programming. This approach emphasize more on function rather than data. It focuses on the development of large software applications in which different parts of the applications are developed independently. The programming languages PASCAL and C follow this approach. With the improvement in the hardware and increased demand for designing very large and complex applications, some problems like maintenance and understanding complex code evolved with this approach.

Post a Comment

0 Comments