1 / 29

Introduction to Object Orientation

Introduction to Object Orientation. Dr. Ahmed Youssef. Object-Orientation. It is a kind of thinking methodology Everything in the world is an object; Any system is composed of objects;

emmett
Download Presentation

Introduction to Object Orientation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Object Orientation Dr. Ahmed Youssef

  2. Object-Orientation • It is a kind of thinking methodology • Everything in the world is an object; • Any system is composed of objects; • The evolution and development of a system is caused by the interactions among the objects inside or outside the system SWE 316- Ahmed Youssef

  3. Why Object Oriented? Decomposition of the large problem into small parts that can be solved separately. Large Application SWE 316- Ahmed Youssef

  4. Object-Oriented Concept • Object & Class • Inheritance • Polymorphism • Encapsulation SWE 316- Ahmed Youssef

  5. Everything in the world is an object • A flower, a tree, an animal • A student, a professor • A desk, a chair, a classroom, a building • A university, a city, a country • The world, the universe • A subject such as CS, SWE, Math, History, … SWE 316- Ahmed Youssef

  6. Object SWE 316- Ahmed Youssef

  7. Any system is composed of objects • A cultural system • An educational system • An economic system • An Information system • A computer system SWE 316- Ahmed Youssef

  8. Procedure Program view Main Program Data Procedure3 Procedure2 Procedure1 SWE 316- Ahmed Youssef

  9. Main Program(Also a module) Data Module2 + Module1 + Data Data Data1 Data1 Data Data2 Procedure2 Procedure3 Procedure1 The main program coordinates calls to procedures inseparate modules and hands over appropriate data as parameters. SWE 316- Ahmed Youssef

  10. Object1 Data1+Procedures1 Object2 Data2 +Procedures2 Data Data1 Object3 Data3 +Procedures3 Object4 Data4 +Procedures4 SWE 316- Ahmed Youssef

  11. Classes • objects sharing common characteristics • contain • state: attributes, fields, variables, data member • behavior: functions, methods SWE 316- Ahmed Youssef

  12. Class Person Ahmed  Majed Salem Saad SWE 316- Ahmed Youssef

  13. Class Student Ahmed  Majed Salem Saad SWE 316- Ahmed Youssef

  14. Class Tennis Player Bandar Mosaed Nayef Khaled SWE 316- Ahmed Youssef

  15. Class Institute Social Technology Engineering Science Agricultural Technology SWE 316- Ahmed Youssef

  16. Class SWE 316- Ahmed Youssef

  17. Class SWE 316- Ahmed Youssef

  18. Class SWE 316- Ahmed Youssef

  19. Class SWE 316- Ahmed Youssef

  20. Class SWE 316- Ahmed Youssef

  21. Object & Class SWE 316- Ahmed Youssef

  22. Object & Class Student Ahmed Majed Salem Saad SWE 316- Ahmed Youssef

  23. Object & Class Student Ahmed Majed Salem Saad SWE 316- Ahmed Youssef

  24. SWE 316- Ahmed Youssef

  25. Building Class Attributes Any Thing Behavior SWE 316- Ahmed Youssef

  26. Student- Class Fname string Lname string Student_ID string Print_info Input: - return: void Level int Program string Update_info Input: name or ID Return : void Tel string Gender string

  27. 1. Create objects from class 3. Manage object 2. objects Obj1 Obj3 Obj2 Obj4

  28. Student Class Instance variable Constructor Constructor

  29. Student Class Overloaded Method Method

More Related