INTRODUCTION
The world we live in is composed of objects. Everything that
we see is an example of object. We ourselves are examples of objects. The chair
you are sitting on is another example of objects. The car, your father drives
is also an example of object. The pets in your house are also objects. The list
is endless.
Aren’t you wondering what this objects all about is? Why are
we referring to everything as an object? Well, answer to all these questions,
you will find in coming lines. This chapter is dedicated to the discussion of
concepts of objects. Let us begin with what exactly an object is.
What is an object?
An object, in real world, can be one of the following:
·
Anything that is visible or tangible.
·
Something that may be apprehended
intellectually.
·
Something towards which one can direct action or
thought
If we study all things meeting above criteria of being objects
, we can say that each of these has a unique identity , some definitive state
or characteristics and some behavior .For instances , we can say that an
”ORANGE” is an object . Its characteristics are: it is spherical shaped; its
color is orange etc. Its behavior is: it is citrus in nature and it tastes
sweet sour. Similarly, we can say that your chair is also an object. Its
characteristics are: it has four legs, a back, may or may not have arms. Its
behavior is: it let you sit on it. With this description can you suggest some
more object examples?
Keep thinking, in the mean time, we define object as
follows:
An object can be
thought of as an entity having specific identity, specific characteristics and
specific behavior.
OR
Java is on object
oriented programming language. An object is a self contained element of
computer program that represent a related group of feature and is design to do
specific task. Objects are also called instances.
Every object has the following
inbuilt characteristics, which we had already discussed above:-
a)
Identity :- it is the name by which an object is
recognize. E.g. pen ,box, chair etc.
b)
State :- the object may be in any state that is
processed or unprocessed. For example the computer may be in any of the
following state; on state ; off state; out of order.
c)
Behaviour :- this refers that what an object is
capable of doing.
NOTE: The state of an
object is represented through the values/attributes of its characteristics at a
given point of time.