Thanks for the mail.
but still i am not clear with your explanation.
you have showed a method which return x*3 when you pass x as a
argument to it.
so, x could be anything x=1,2,4,5, etc ......do you mean as this
method is reusable for any value of x and it will return the
mutiplicative output all the time.....its an example of
abstraction.........is this what you wanted to mean ?
i dont get the idea what you wanted to mean by those example.....how
abstraction is related with that.
However from google search i found "A view of a problem that extracts
the essential information relevant to a particular purpose and ignores
the remainder of the information."
still, its very difficult to percept how and where we use this concept
in programming......i
cant beleve yet that abstract classes are examples of the abstraction
of a class ? is it true ?
>so, x could be anything x=1,2,4,5, etc ......do you mean as this
>method is reusable for any value of x and it will return the
>mutiplicative output all the time.....its an example of
>abstraction.........is this what you wanted to mean ?
Yes, the value of »x« is left out from the method declaration,
hence, "abstracted".
>cant beleve yet that abstract classes are examples of the abstraction
>of a class ?
abstraction (i.e., removal) of method bodies.
gk - 04 Sep 2006 19:40 GMT
you told ............
> abstraction (i.e., removal) of method bodies.
ok...so this means when we declare an abstract class ,we declare couple
of abstract methods .....those methods are actually the
abstraction...because we dont put any piece of code threon....its bit
extracted or abstracted or in summarised methods .....and the party who
will use it has to give them the body and have to do their own.
is this all about data abstraction for a class ? its looks simple now.
> >so, x could be anything x=1,2,4,5, etc ......do you mean as this
> >method is reusable for any value of x and it will return the
[quoted text clipped - 8 lines]
>
> abstraction (i.e., removal) of method bodies.
gk - 04 Sep 2006 19:45 GMT
and yes, one more thing....i think data abstraction are also exhibited
by java interfaces too......right ? because interfaces are also more
or less similar to abstract classes .
> you told ............
>
[quoted text clipped - 20 lines]
> >
> > abstraction (i.e., removal) of method bodies.