Tuesday, April 19, 2011

Objects










An identifiable entity which has its own properties and behaviors.
Everything we see around us are objects. 
eg:- BOOK




Book has Properties
  1. width
  2. height
  3. no. of pages
  4. title

behaviors
  1. turn pages


Mobile-phone has
Properties
  1. display-screen
  2. resolution
  3. keypad
  4. price
  5. ring-tone

behaviors
  1. receive call
  2. make call
  3. ring
  4. switch on/switch off

The properties makes it appear as a mobile-phone. (Determines its state)
The behaviors makes it behave like mobile-phone. (Makes state-change)


all ring switch on/switch off

The properties makes it appear as a mobile-phone. (Determines its state)
The behaviors makes it behave like mobile-phone. (Makes state-change)








No comments:

Post a Comment