1
Introduction to Programming [C++]
Lecture 01:
Introduction to Object Oriented
Programming(OOP)
Learning Objectives
2
To know about:
Software Crisis
Software Evolution
Procedure Oriented Programming
Object Oriented Programming
Software Crisis
3
Development in software technology is dynamic
New tools and techniques are announced in quick
succession
The software industry is forced to continuously look
for new approaches to software design and
development
These rapid advances create a situation of crisis
within the industry
The software industry has a remarkably bad record
in delivering products
Software Crisis
4
The following issues need to be resolved to overcome this crisis:
How to represent real-life entities of problems in system design?
How to design system with open interfaces?
How to ensure reusability and extensibility of modules?
How to develop modules that are tolerant of any changes in
future?
How to improve software productivity and decrease software
cost?
How to improve the quality of software?
How to manage time schedules?
Software Evolution
5
To build today’s complex software
it is just not enough to put together
a sequence of programming
statements and sets of procedures
and modules
Sound construction techniques and
program structures that are easy to
comprehend implement and
modify needs to be incorporated
Software Evolution
6
With the advent of languages such as c, Object Oriented Programming (OOP) is an
structured programming became very approach to program organization and
popular and was the main technique of the development that attempts to eliminate some
1980’s. of the pitfalls of conventional programming
Structured programming was a powerful tool methods by incorporating the best of
that enabled programmers to write structured programming features with
moderately complex programs fairly easily. several powerful new concepts.
However, as the programs grew larger, even It is a new way of organizing and developing
the structured approach failed to show the programs and has nothing to do with any
desired result in terms of bug-free, easy-to- particular language.
maintain, and reusable programs. However, not all languages are suitable to
implement the OOP concepts easily.
Procedure Oriented Programming
7
In the procedure oriented
approach, the problem is viewed
as the sequence of things to be
done such as reading, calculating
and printing
Procedure oriented programming
languages are COBOL, FORTRAN,
C etc.
The primary focus
is on functions.
Procedure Oriented Programming
8
Characteristics of procedure oriented programming are given below:
Emphasis is on doing things (algorithms).
Large programs are divided into smaller programs known as functions.
Most of the functions share global data.
Data move openly around the system from function to function.
Functions transform data from one form to another.
Employs top-down approach in program design.
Object Oriented Programming
9
The major motivating factor in the invention of object-
oriented approach is to remove some of the flaws
encountered in the procedural approach.
OOP treats data as a critical element in the program
development and does not allow it to flow freely around the
system.
It ties data more closely to the function that operate on it,
and protects it from accidental modification from outside
function.
OOP allows decomposition of a problem into a number of
entities called objects and then builds data and function
around these objects.
Object Oriented Programming
10
Some of the features of object oriented programming are:
Emphasis is on data rather than procedure.
Programs are divided into what are known as objects.
Data structures are designed such that they characterize the objects.
Functions that operate on the data of an object are ties together in the data
structure.
Data is hidden and cannot be accessed by external function.
Objects may communicate with each other through function.
New data and functions can be easily added whenever necessary.
Follows bottom up approach in program design.
Procedure Oriented Programming VS Object Oriented Programming
11
Procedure Oriented Programming (POP) Object Oriented Programming (OOP)
1. Program is divided into small parts called 1. Program is divided into parts called objects
functions
2. Importance is not given to data but to functions 2. Importance is given to the data rather than
as well as sequence of actions to be done procedures or functions
3. Less secure 3. More secure
4. Example C 4. Example C++
12
THANK YOU