an introduction to object oriented programming
DESCRIPTION
TRANSCRIPT
Object-Oriented ProgrammingAn Introduction To
By Ali Shakiba
If + GoTo
If + GoTo - Complicated
Structured + Methods
Data + Pointer
Data Structure
Structured Programming - Complicated
Object-Oriented Programming (OOP)
OOP Cont.
OOP Concepts
• Class & Object• Encapsulation• Inheritance• Interface• Polymorphism• Visibility
• Benefits
Class & Object
Encapsulation
Inheritance & Specialization
Inheritance & Specialization Cont.
Interface
Interface Cont
Peykan: Driving Wheel, Consume FuelLamborghini: Driving Wheel, Consume FuelHorse: Tack, Consume GrassDonkey: Tack, Consume Grass
Polymorphism
Cars consume fuel…A car can consume regular gasoline/petrolA car can consume premium gasolineA car can consume bio-fule
Visibility
Email: Private, only owner
Member-only mailing list: Only members
Public mailing list: Every one
OOP Benefits
Reuse: Inheritance, Composition
Productivity: Encapsulation, Visibility
Bigger and Better Software