Subject : Information Technology
Paper : Object Oriented Concepts & Programming
Module : Introduction to C++ Programing
Programming Language History
Programming is a process of writing solution to a problem in a computer language so that it can
be executed by computer.
With increasing level of complexities of applications the methodology of programming have
changed. Initially after the invention of computers the first programming method was- machine
level programming. With few hundreds lines of code this approach worked well but as the
complexity of programs increased a new language – Assembly Language was invented which
uses symbolic representation of machine instructions. It was comparatively easy to write and
maintain the code using assembly language. As the program size and complexity kept on
increasing, higher level languages were introduced such as FORTAN, C , BASIC , COBOL . A
higher level language is one which is closer to human language and thus further from machine
language.
C language is general purpose , fast and widely used language. It is well suited for system level
application as the code written in C runs faster.
But it is not suitable for large software development as the complexity increases and software
become hard to maintain.
There was another language - Simula which had the object oriented features helpful in large
software development but was not very efficient in term of time. C++ was inspired by both these
languages, thus it contain the object oriented features as well as the efficiency of C .
C++ was created by Bjarne Stroustrup . Its development began in 1979 at Bell laboratories in
New Jersey . The language was initially known as “C with classes” . In 1983 the name was
changed to C++ , as the language was more than classes . C++ was extension to C language
and has the backward compatibility with C.
There are so many programming languages available but C and C++ are one of the most widely
used language in software industry. They are used for creating everything from Operating
System to embedded systems, games, desktop application and so on.
C++ provides support for both procedural programming as well as object oriented programming.
Let’s understand the difference between Procedure Oriented and Object Oriented programming
paradigms.
, Module 1 - Introduction to C++ Programing
Procedure Oriented Approach vs Object Oriented
Approach
There are different approaches to build a solution to a specific problem known as Programming
Paradigms. Procedure Oriented and Object Oriented are two major paradigms.
The conventional approach (ex. FORTAN, COBOL and C) for solving a problem is Procedure
Oriented Programming .
In Procedure Oriented Programming the focus is on Procedures also known as Function or
Routines. It gives the step by step approach to solve the problem .It is also known as top down
approach – a big problem is broken into smaller segments (functions)
Main Program
function 1 function 2 function 3
This approach is intuitive as we give a step by step solution to a problem.
Procedure Oriented relies on Procedures and Data which are two separate concepts. Data move
freely around these procedures thus there is no data security constraint. There is no control over
the way the data is processed or modified. In Object Oriented approach these two concepts are
bundled in to a single concept of Entity (object).
In Object Oriented every problem is perceived in terms of collection of Entities / Objects. Every
Entity encapsulates the data and behavior in a single unit called Class. Here the data can be
processed only in the way that has been defined by the class, this makes the application more
maintainable.
Object oriented approach gives the power that the data can be hidden and cannot be accessed by
outside world directly. Entities communicate with each other with the help of functions.
Entity A Entity B
Data Data
communication
Fucntios Fucntios
ns ns
Dr. Jyoti Pareek 2 Object Oriented Concepts & Programming
Paper : Object Oriented Concepts & Programming
Module : Introduction to C++ Programing
Programming Language History
Programming is a process of writing solution to a problem in a computer language so that it can
be executed by computer.
With increasing level of complexities of applications the methodology of programming have
changed. Initially after the invention of computers the first programming method was- machine
level programming. With few hundreds lines of code this approach worked well but as the
complexity of programs increased a new language – Assembly Language was invented which
uses symbolic representation of machine instructions. It was comparatively easy to write and
maintain the code using assembly language. As the program size and complexity kept on
increasing, higher level languages were introduced such as FORTAN, C , BASIC , COBOL . A
higher level language is one which is closer to human language and thus further from machine
language.
C language is general purpose , fast and widely used language. It is well suited for system level
application as the code written in C runs faster.
But it is not suitable for large software development as the complexity increases and software
become hard to maintain.
There was another language - Simula which had the object oriented features helpful in large
software development but was not very efficient in term of time. C++ was inspired by both these
languages, thus it contain the object oriented features as well as the efficiency of C .
C++ was created by Bjarne Stroustrup . Its development began in 1979 at Bell laboratories in
New Jersey . The language was initially known as “C with classes” . In 1983 the name was
changed to C++ , as the language was more than classes . C++ was extension to C language
and has the backward compatibility with C.
There are so many programming languages available but C and C++ are one of the most widely
used language in software industry. They are used for creating everything from Operating
System to embedded systems, games, desktop application and so on.
C++ provides support for both procedural programming as well as object oriented programming.
Let’s understand the difference between Procedure Oriented and Object Oriented programming
paradigms.
, Module 1 - Introduction to C++ Programing
Procedure Oriented Approach vs Object Oriented
Approach
There are different approaches to build a solution to a specific problem known as Programming
Paradigms. Procedure Oriented and Object Oriented are two major paradigms.
The conventional approach (ex. FORTAN, COBOL and C) for solving a problem is Procedure
Oriented Programming .
In Procedure Oriented Programming the focus is on Procedures also known as Function or
Routines. It gives the step by step approach to solve the problem .It is also known as top down
approach – a big problem is broken into smaller segments (functions)
Main Program
function 1 function 2 function 3
This approach is intuitive as we give a step by step solution to a problem.
Procedure Oriented relies on Procedures and Data which are two separate concepts. Data move
freely around these procedures thus there is no data security constraint. There is no control over
the way the data is processed or modified. In Object Oriented approach these two concepts are
bundled in to a single concept of Entity (object).
In Object Oriented every problem is perceived in terms of collection of Entities / Objects. Every
Entity encapsulates the data and behavior in a single unit called Class. Here the data can be
processed only in the way that has been defined by the class, this makes the application more
maintainable.
Object oriented approach gives the power that the data can be hidden and cannot be accessed by
outside world directly. Entities communicate with each other with the help of functions.
Entity A Entity B
Data Data
communication
Fucntios Fucntios
ns ns
Dr. Jyoti Pareek 2 Object Oriented Concepts & Programming