0% found this document useful (0 votes)
429 views24 pages

Presentation On OOP (Object Oriented Programming) : Presented by RD

The document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and message passing. It discusses that OOP focuses on modeling a system using objects that interact with each other through methods. Some common OOP languages are listed and basic concepts such as objects, classes, data abstraction, and encapsulation are defined in 1-2 sentences each. Examples are given to illustrate various concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
429 views24 pages

Presentation On OOP (Object Oriented Programming) : Presented by RD

The document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and message passing. It discusses that OOP focuses on modeling a system using objects that interact with each other through methods. Some common OOP languages are listed and basic concepts such as objects, classes, data abstraction, and encapsulation are defined in 1-2 sentences each. Examples are given to illustrate various concepts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Presentation on OOP

(Object Oriented Programming)

Presented by
RD
What is
OOP ?
A programming paradigm that is focused on objects and
data

as opposed to actions and logic

Objects are identified to model a system

Objects are designed to interact with each other


Some OOP Languages
C++
Java
C#
Java
Visual Basic .NET
(VB.NET)
Objective C
PHP 5
Basic Concept Of Object
Oriented Programming
Objects
Classes
Data Abstraction
Encapsulation
Inheritance
Polymorphism
Dynamic Binding
Message Passing
Objects

They may represent a person, a place or any


item that the program must handle.
Objects are the basic run-time entities in an
object-oriented system An object is entity that
has state, behavior and identity . there are many.
Every object is associated with data and
functions which define meaningful operations
on that object.
Object is a real world existing entity.
Object is an Instance of a particular class.
Example

Mouse is
object
Behavior Scrolli
ng

Left Right
Click Click
Class

A class is an entity that helps the


programmer to define a new complex data
type. A class defines the data and behavior of
object . In simple words , a class is a collection
of object of similar type.
Classes are user -defined data types and it
behaves like built in types of programming.
objects are variables of class.
Once A class has been defined we can create
any number of objects for that class.
Class : Fruit

Banana Apple Pineappl Strawberry


e
Data
Abstraction

A data abstraction is a simplified


view of an object that includes only
features one is interested in while
hides away the unnecessary
details.

Data abstraction becomes an


abstract data type (ADT)or a user-
defined type.
Examp
le

Progra Executio Output


m n
Hiding Of
Data And
Its
Background
Detail
Encapsulation
Encapsulation is the first pillar or
principal
of object oriented programming.

In simple words, "encapsulation is a


process of binding data
members(variable, properties)and
member function(methods)into a single
unit

And class is the best example of


encapsulation.
Encapsulation

Class: student

Attributes: st_name, st_id,


(Data) branch, semester
Functions: Enroll()
Displayinfo()
Result()
Performance()
Inheritance
The mechanism of deriving a new class
from an old class is called inheritance or
derivation.

Inheritance is the mechanism to


provides the power of reusability and
extendibility.

Inheritance is the process by which one


object can acquire the properties of
another object.
Example
Inheritance
Parent
class
Or
Base
Point class

Child
class
Or
Derived
class Line
Polymorphism

Polymorphism is an important object


oriented
programming concept. This is a Greek term,
means the
ability to take more than one form.
For
Example
plus '+' is used to make sum of two
number as well as it is used to combine
two strings.

Operator
+

in+dia=i
5+5=10 ndia
Dynamic
Binding

Binding means link between procedure call


and code
to be execute.

It is the process of linking of a function


call to the
actual code of the function at run-time.

That is, in dynamic binding, the actual


code to be
executed is not known to the compiler until
Massage Passing

Objects can communicate with each others


by passing
massage same as passing massage with
each other.

Objects can send or receive message or


information.

Message passing involves the following basic


steps:
-Creating classes that define objects and
their behavior.
Examp
le
consider two classes product and order.
the object of the product class can
communicate with the order class by
sending a request for placing order.Object :order1
order. place_order(qty_in_hand):
Order_place (int q)
Massage{
passing
Object name
}
Function
or Informati
massage on
(Optional
)
Message Passing
StudentObje FacultyObjec
ct t

Performance

MgmtObject Performance
Result
Thank you

You might also like