Object
Any entity that has state and behavior is known as an object. For example: chair, pen, table, keyboard, bike etc. It can be physical and logical.
It is a bundle of related variables and functions (also known methods).
Objects share two characteristics: They have State and Behavior.
Objects share two characteristics: They have State and Behavior.
- State: State is a well defined condition of an item. A state captures the relevant aspects of an object
- Behavior: Behavior is the observable effects of an operation or event,
Example :
Object: – Car
State: Color, Make
Behavior: Climb Uphill, Accelerate, SlowDown etc
Characteristics of Objects:
- Abstraction
- Encapsulation
- Message passing
No comments:
Post a Comment