Lecture 1 - Introduction To Oop

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

II B.

COM CA- 19CUG38 – OOPS WITH C++

Introduction to Object
Oriented Programming

Prepared & Presented By


Mrs.B.Meena Preethi
Assistant Professor
Department of Software Systems
Sri Krishna Arts and Science College
ODD 2020-2021
Topics to be Covered
Introduction to OOP :

Software Evolution
A Look at Procedure Oriented programming –
Object- Oriented Programming paradigm –
Session Outcome

To understand what is a software and types of


programming languages and its evolution.
To know the concepts of procedure and Object
Oriented Programming Concepts.
Software Evolution
What is a Software ?
• Software is a set of instructions, data or programs used to
operate computers and execute specific tasks.
• To develop a software , we need programming languages.
• Software evolution has different phases or layers.
• Ernest Tello, a well known writer in a field of Artificial
Intelligence, compared the evolution of Software Technology to
the growth of tree.
• Like a tree, the software has distinct phases “layers” of growth
build over last five decades.
Software Evolution
• The Machine Language(0,1) are only
understood by the machine. This is low-level
language.
• Assemble language is a middle level
language. It can be understand by people
and machine. (Eg: ADD,STA,SUB)
• With the advent of languages such as C,
structured programming became very
popular and was the main technique of the
1980’s.
• Structured programming was a powerful tool
that enabled programmers to write
moderately complex programs fairly easily.
Software Evolution
• However, as the programs grew larger, even the structured approach failed
to show the desired result in terms of bug-free, easy-to- maintain, and
reusable programs.
• Object Oriented Programming (OOP) is an approach to program
organization and development that attempts to eliminate some of the
pitfalls of conventional programming methods by incorporating the best of
structured programming features with several powerful new concepts.

• It is a new way of organizing and developing programs and has nothing to


do with any particular language. However, not all languages are suitable to
implement the OOP concepts easily.
Introduction
Conventional Programming:
• Conventional programming, using high level language
such as COBOL, PASCAL and C is commonly known as
Procedure-Oriented Programming (POP).
• In the procedure Oriented Approach, the problem is
viewed as a sequence of thing to be done such as
reading, calculating and printing.
• A number of functions are written to accomplish these
tasks. The focus is on function.
Conventional Programming:
• We normally use Flowcharts to organize these actions
and represent the flow from one action to another.
Typical Structure of Procedure Oriented programming

Conventional Programming:
• Conventional programming, using high level language
such as COBOL, PASCAL and C is commonly known as
Procedure-Oriented Programming (POP).
• In the procedure Oriented Approach, the problem is
viewed as a sequence of thing to be done such as The
The technique of hierarchical decomposition has been
used to specify the task to be completed for solving a
problem.
Characteristics of procedure-oriented programming

• Emphasis is on doing thing (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.
Drawbacks of Procedure Oriented Programming:

It emphasis on doing things. Data is given a second class


status even through the data is the reason for the existence of
the program.

Since every function has complete access to the global


variables, the new programmer can corrupt the data
accidentally by creating function. If new data is to be added, all
the function needed to be modified to access the data.
Object Oriented Paradigm :

• 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 Paradigm :

• 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.
The data of an object can be accessed only by the function associated
with that object. However, function of one object can access the
function of other objects.
Object Oriented Paradigm :

• 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.
Features of object oriented programming :

• 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.
Definition of Object Oriented Programming :

• Object Oriented Programming as an approach that


provides a way for modularizing programs by creating
Partitioned memory are for both data and functions
that can be used as templates for creating multiple
copies of such modules on demand.
Summary
POP – PROCEDURE ORIENTED PROGRAMMING
MCQ
1. ________________Emphasis is on doing thing (algorithms).
a) POP
b) OOP
c) OOD
d) OOM

2. ________________Emphasis is on data rather than procedure


a) POP
b) OOP
c) OOD
d) OOM
MCQ
3. __________follows bottom up approach.
a) POP
b) OOP
c) OOD
d) PPO

4. ________employs top down approach.


a) POP
b) OOP
c) OOD
d) PPO
MCQ
5. _______________as an approach that provides a way for modularizing
programs by creating Partitioned memory are for both data and functions that
can be used as templates for creating multiple copies of such modules on
demand.
a) OOP
b) POP
c) PPO
d) OOD

6. Data move openly around the system from function to function


a) OOP
b) POP
c) PPO
d) OOD
INTERACTION & QUERIES????????

You might also like