3 Slide Oop
3 Slide Oop
Ubaid Ur Rehman
[email protected]
Structured Programming
FUNCTION 4 FUNCTION 5
Structured Programming
Using function
Function & program is divided into modules
Every module has its own data and function
which can be called by other modules.
Object-Oriented Programming
Object 1 Object 2
Data Data
Function Function
Object 3
Data
Function
Object-Oriented Programming
Numbers
Object-Oriented Programming
Text
Object-Oriented Programming
Pictures
Object-Oriented Programming
Sound
Object-Oriented Programming
Video
Object-Oriented Programming
An object is anything that can be represented
by data.
Object-Oriented Programming
An object can be
something in the
physical world or even
just an abstract idea.
A n a i r p l a n e , f o r
example, is a physical
object that can be
manipulated by a
computer.
Object-Oriented Programming
An object can be
something in the
physical world or even
just an abstract idea.
A bank transaction is
an example of an
object that is not
physical.
Example: A “Rabbit”
Object
You could (in a game, for example) create an
object representing a rabbit
It would have data:
How hungry it is
How frightened it is
Where it is
And methods:
eat, hide, run, dig
Object-Oriented Programming:
Terminology
T h e d a t a t h a t Name: PA 3794
Object Property