Download presentation
Presentation is loading. Please wait.
Published byClifton Holmes Modified over 9 years ago
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 2 SWE 316- Ahmed Youssef
3
Decomposition of the large problem into small parts that can be solved separately. Why Object Oriented? Large Application 3 SWE 316- Ahmed Youssef
4
Object-Oriented Concept Object & Class Inheritance Polymorphism Encapsulation 4 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, … 5 SWE 316- Ahmed Youssef
6
Object 6 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 7 SWE 316- Ahmed Youssef
8
Procedure Program view Main Program Data Procedur e 1 Procedur e 2 Procedur e 3 8 SWE 316- Ahmed Youssef
9
Main Program(Also a module) Data Data 1 Module 2 + DataData 2 Module 1 + DataData 1 Procedure 1 Procedure 2 The main program coordinates calls to procedures in separate modules and hands over appropriate data as parameters. Procedure 3 9 SWE 316- Ahmed Youssef
10
Object 1 Data 1 +Procedures 1 DataData 1 Object 3 Data 3 + Procedures 3 Object 2 Data 2 + Procedures 2 Object 4 Data 4 + Procedures 4 10 SWE 316- Ahmed Youssef
11
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 12 SWE 316- Ahmed Youssef
13
Class Student Ahmed Majed Salem Saad 13 SWE 316- Ahmed Youssef
14
Class Tennis Player Bandar Mosaed Nayef Khaled 14 SWE 316- Ahmed Youssef
15
Class Institute Social Technology Engineering Science Agricultural Technology 15 SWE 316- Ahmed Youssef
16
Class Name Attributes Operations … 16 SWE 316- Ahmed Youssef
17
Class Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc... 17 SWE 316- Ahmed Youssef
18
Class Tennis Player FirstName LastName Nationality Ranking etc… RegisterForTournament etc... 18 SWE 316- Ahmed Youssef
19
Class Car Car Reg. Number Maker Model Color etc… Accelerate Stop etc... 19 SWE 316- Ahmed Youssef
20
Class Airplane Plane Number Manufacturer Model etc… TakeOff Landing etc... 20 SWE 316- Ahmed Youssef
21
21 Object & Class SWE 316- Ahmed Youssef
22
Object & Class Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc... Student Ahmed Majed Salem Saad 22 SWE 316- Ahmed Youssef
23
Object & Class Student1 B4555555 Ahmed Alfgdfg 7146 sdasds7 etc… RegisterForCourse DropCourse etc... Student Ahmed Majed Salem Saad 23 SWE 316- Ahmed Youssef
24
Student1 B4555555 Ahmed Alfgdfg 7146 sdasds7 etc… RegisterForCourse DropCourse etc... Student StudentID FirstName LastName Address etc… RegisterForCourse DropCourse etc... 24 SWE 316- Ahmed Youssef
25
Building Class SWE 316- Ahmed Youssef 25 Any Thing Attribute s Behavior
26
Student- Class 26
27
Main Class Student Class 3. Manage object 1. Create objects from class Obj 1 Obj 2 Obj 3 Obj 4 2. objects 27
28
Student Class Instance variableConstructor 28
29
Method Overloaded Method Student Class 29
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.