10
OOP in 10 minutes An introductory topic to OOD Sameh Deabes

OOP in 10 minutes

Embed Size (px)

Citation preview

Page 1: OOP in 10 minutes

OOP in 10 minutesAn introductory topic to OOD

Sameh Deabes

Page 2: OOP in 10 minutes

How to write a novel in Russian?

Page 3: OOP in 10 minutes

How to write a novel in Russian?• Characters• Words• Phrases• Paragraphs• Syntax• Eloquence = بالغة• Literature = أدب• Novels = روايات

Page 4: OOP in 10 minutes

How to write programs like novels?• Programming language:• Characters, Numbers, syntax• Methods, modules

• OOP• OOD• Design Patterns• Enterprise Architecture Patterns• Integration patterns

Page 5: OOP in 10 minutes

Concepts of OOP I - Abstraction• Abstraction = تجريد• Simulating real-world objects in computer world• The ability to classify (create classes/blueprints + objects)• الشيء هو ليس الشيء وصفك

Page 6: OOP in 10 minutes

Concepts of OOP II - Encapsulation• Encapsulation = = كبسولة في كبسلة• data hiding• access modifiers: public, private, protected, internal, protected internal• hide implementation details

Page 7: OOP in 10 minutes

Concepts of OOP III - Inheritance• Inheritance = وراثة• Sharing data and functionality from parents

Page 8: OOP in 10 minutes

Concepts of OOP IV - Polymorphism• Polymorphism poly = متعدد, -morphism = أوجه• Many forms @ runtime depending on context

Page 9: OOP in 10 minutes

Concepts of OOP IV – Polymorphism (Cont’d)• Types of polymorphic behavior• inheritance/interface polymorphism• Overloading• Generics [parametric polymorphism]• Reflection

Page 10: OOP in 10 minutes

Polymorphism demo