Object oriented programming OOP

Preview:

DESCRIPTION

MTC shoubra

Citation preview

Object Oriented Programming :

Why OOP ?

1.It make code easily .

2.Write code one time, don’t repeat code .

3.Ease of modification of the code .

OOP is using Biology !

!ايه الي جاب القلعة جنب البحر

Notice :

1.Every thing is an object .

2.Every object contains :•Attributes •Actions (methods)

Ex: Person .

1. Attributes :

Name = value !Ex:Name= AhmadAge = 21 ...

2. Actions (methods)

Ex :

Eat , walk , sleep ,,,,,,,

Every thing the object had done called

“Action”

Object (car) :

Actions Attributes

walk color

Turn left model

Turn right speed

Deference between Class and Object :

Class consist of :

1. Actions .

2. Attributes .

But !!!!

“الكالاااس هو االساااااااس “

Are you Understand !

Objects & Classes In Programming :

Actions Attributes

Methods variables

Recommended