Topic 1
Topic 1
What is Object-
Orientation?
A technique for system modeling
Architectural models
Mechanical models
Example OO Model
Example OO lives-
Model
Ali in
House
Objects
Ali drives
House
Car
Tree
Car Tree
Interactions
Ali lives in the house
Ali drives the car
Object-Orientation -
Advantages
People think in terms of objects
State (attributes)
Well-defined behaviour (operations)
Unique identity
Example Ali is a Tangible
Object
State (attributes)
Name
Age
behaviour (operations)
Walks
Eats
Identity
His name
Example Car is a Tangible
Object
State (attributes)
- Color
- Model
behaviour (operations)
- Accelerate - Start Car
- Change Gear
Identity
- Its registration number
Example Time is an Object
Apprehended
State (attributes)
Intellectually
- Hours - Seconds
- Minutes
behaviour (operations)
- Set Hours - Set Seconds
- Set Minutes
Identity
- Would have a unique ID in the model
Example Date is an Object
Apprehended Intellectually
State (attributes)
Year - Day
Month
behaviour (operations)
- Set Year - Set Day
- Set Month
Identity
- Would have a unique ID in the model