Object Oriented Programming (OOP) Principles

 
INTRODUCTION
TO
OBJECT ORIENTED
PROGRAMMING
 
P
r
e
s
e
n
t
e
d
 
B
y
,
M
s
.
M
.
J
a
n
c
y
p
r
i
y
a
,
A
s
s
t
.
 
P
r
o
f
.
,
 
D
e
p
t
.
 
o
f
 
C
A
,
B
o
n
 
S
e
c
o
u
r
s
 
C
o
l
l
e
g
e
 
f
o
r
 
W
o
m
e
n
,
T
h
a
n
j
a
v
u
r
.
 
OOP
 
O
bject-
o
riented 
p
rogramming (
OOP
)
refers to a type of computer programming
(software design) in which programmers
define not only the data type of a data
structure, but also the types of operations
(functions) that can be applied to the data
structure
Examples of OOP languages include Java,
C++ and Smalltalk.
 
Principles of OOP
 
Objects
Classes
Data abstraction and encapsulation
Inheritance
Polymorphism
Dynamic binding
Message passing
 
Objects
 
The basic run time entities in object
oriented system.
It represent a person, a place, a bank
account or any item that the program has
to handle.
S
t
u
d
e
n
t
 
 
 
 
 
 
 
 
Average
Display
Total
 
 
 
O
b
j
e
c
t
:
 
S
t
u
d
e
n
t
 
D
A
T
A
Name
DOB
Marks
F
U
N
C
T
I
O
N
S
 
Total
 
Average
 
 
 
 
Classes
 
The entire set of data and code of an
object can be made of user defined data
types with the help of class.
Once class has been defined we can
create number of object belongs to that
class.
A class is a collection of object of similar
data type.
Example:
   
Fruit mango;
 
Data Encapsulation
 
The wrapping up of data and functions
into a single unit (called Class) is known
as encapsulation.
Only access those functions which are
wrapped in the class.
The insulation of the data from direct
access by the program is called data
hiding and information hiding.
 
Data Abstraction
 
It represents essential features without
including the background details or
explanations.
It defined as a list of abstract attributes. Its
sometime called data member because it
holds information.
This functions are called as methods or
member functions.
Abstraction is known as Abstract Data
Type(ADT)
 
Inheritance
 
Inheritance is the process by which
objects of one class acquire the properties
of objects of another class. It supports the
concept of 
hierarchical classification.
 
Bird
 
   Flying bird 
 
    Robin
 
Polymorphism
 
An operation may exhibit different
behaviors in different instances.
The behavior depends upon the
types of data used in the operation.
Polymorphism, a greek term means
ability to take more than one form.
 
T
o
 
b
e
 
c
o
n
t
i
n
u
e
d
 
Operator overloading &
                       Function overloading
 
The process of making an operator to
exhibit different behaviors in different
instances is known a 
operator overloading.
E
x
a
m
p
l
e
:
 
t
w
o
 
n
u
m
b
e
r
s
 
o
p
e
r
a
t
i
o
n
 
s
u
m
A single function name to perform different
types of tasks is known as 
function
overloading.
 
Dynamic Binding
 
Binding refers to the linking of a procedure
call to the code to be executed in
response to the call.
Dynamic binding (also known as late
binding) means that the code associated
with a given procedure call is not known
until the time of the call at run-time.
It is associated with polymorphism and
inheritance.
 
Message passing
 
An object- oriented program consists of a
set of objects that communicate with each
other.
Creating classes that define objects and their
behavior
Creating objects from class definitions
Establishing communication among objects
 
Benefits of OOPs
 
Eliminate redundant code and extend the use of
exiting classes.
The principle of data hiding helps the
programmer to build secure programs
It is easy to partition the work in a project based
on objects.
Object oriented systems can be easily upgraded
from small to large systems.
Software complexity can be easily managed.
 
Applications of OOPs
 
Real-time systems
Simulation and modeling
Object oriented databases
Hypertext, hypermedia and expertext
AI and expert systems
Neural networks and parallel programming
Decision support and office automation systems
CIM/CAM/CAD systems
Slide Note
Embed
Share

Object-Oriented Programming (OOP) is a software design approach where programmers define data structures and operations. Key principles include objects, classes, data encapsulation, inheritance, polymorphism, and data abstraction. OOP allows for better organization and reusability of code, fostering modular and efficient programming practices.

  • OOP Principles
  • Software Design
  • Objects
  • Classes
  • Inheritance

Uploaded on Jul 12, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. INTRODUCTION TO OBJECT ORIENTED PROGRAMMING Presented By, Ms.M.Jancypriya, Asst. Prof., Dept. of CA, Bon Secours College for Women, Thanjavur.

  2. OOP Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure Examples of OOP languages include Java, C++ and Smalltalk.

  3. Principles of OOP Objects Classes Data abstraction and encapsulation Inheritance Polymorphism Dynamic binding Message passing

  4. Objects The basic run time entities in object oriented system. It represent a person, a place, a bank account or any item that the program has to handle.Student Object: Student Total DATA Name DOB Marks Average FUNCTIONS Total Average Display

  5. Classes The entire set of data and code of an object can be made of user defined data types with the help of class. Once class has been defined we can create number of object belongs to that class. A class is a collection of object of similar data type. Example: Fruit mango;

  6. Data Encapsulation The wrapping up of data and functions into a single unit (called Class) is known as encapsulation. Only access those functions which are wrapped in the class. The insulation of the data from direct access by the program is called data hiding and information hiding.

  7. Data Abstraction It represents essential features without including the background details or explanations. It defined as a list of abstract attributes. Its sometime called data member because it holds information. This functions are called as methods or member functions. Abstraction is known as Abstract Data Type(ADT)

  8. Inheritance Inheritance is the process by which objects of one class acquire the properties of objects of another class. It supports the concept of hierarchical classification. Bird Flying bird Robin

  9. Polymorphism An operation may exhibit different behaviors in different instances. The behavior depends upon the types of data used in the operation. Polymorphism, a greek term means ability to take more than one form. To be continued

  10. Operator overloading & Function overloading The process of making an operator to exhibit different behaviors in different instances is known a operator overloading. Example: two numbers operation sum A single function name to perform different types of tasks is known as function overloading.

  11. Dynamic Binding Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run-time. It is associated with polymorphism and inheritance.

  12. Message passing An object- oriented program consists of a set of objects that communicate with each other. Creating classes that define objects and their behavior Creating objects from class definitions Establishing communication among objects

  13. Benefits of OOPs Eliminate redundant code and extend the use of exiting classes. The principle of data hiding helps the programmer to build secure programs It is easy to partition the work in a project based on objects. Object oriented systems can be easily upgraded from small to large systems. Software complexity can be easily managed.

  14. Applications of OOPs Real-time systems Simulation and modeling Object oriented databases Hypertext, hypermedia and expertext AI and expert systems Neural networks and parallel programming Decision support and office automation systems CIM/CAM/CAD systems

  15. THANK YOU...

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#