Let
us now look deep into what are objects. If we consider the real world we can
find many objects around us, cars, Dogs, Human, etc. All these objects have
states and behavior. If we consider Dog, then its state is – name, breed, color
and behavior is-barking, wagging, running etc.
Ø If you compare the software object with real
world object, they have very similar characteristics.
Ø Software objects also have a state and
behavior. A software object’s state is stored in fields and behavior is shown
via methods.
Ø So in software development, methods operate
on the internal state of an object & object to object communication is done
via methods.
0 comments:
Post a Comment