INTRODUCTION TO OBJECT
ORIENTED PROGRAMMING
CONCEPTS:
Programming approach:
1.POP – Procedure Oriented Programming
2.OOP – Object Oriented Programming
POP ?
Procedure Oriented Programming basically consists of a list
of instructions for the computer to follow and these are
organized into groups known as functions. In Procedure
Oriented Programming, most of the functions share global
data and this data moves more openly around the system
from one function to the other.
OOP ?
Object Oriented Programming is an approach in which
stress is laid on data rather than functions.
Principles of OOP :
1. Data Abstraction
2.Encapsulation
3.Polymorphism
4.Inheritance
Data Abstraction :-
Data Abstraction is the act of
representing the essential features
without knowing the background
details.
Example:
Encapsulation:-
Wrapping of data and functions
that operate on that data into a
single unit is called Encapsulation.
Polymorphism :-
It is the ability of an object to
take more than one form.
Inheritance
Inheritance enables new classes to
receive or inherit the properties and
methods of existing classes.
Difference between OOP & POP :-
Object Oriented Procedure
Programming oriented
Programming
The stress is put The stress is put on
on data rather function rather than
than functions. data.
The data is It allows data to flow
restricted, to be freely throughout the
used in a specific program.
program area.
It follows bottom- It follows top-down
up programming programming
approach. approach.
Benefits of Object Oriented Programming.
1.The reusability of the program code is
enhanced.
2.Data abstraction makes the software
easier to handle.
3.Software for complex tasks can be easily
developed.