Abstraction is closely related to Encapsulation.
Abstracttion is a high level term. Its
something like virtually practical. For example, Person. Person is
a abstract term. If I ask you who is person then you will say "Me,you
and any other". But what are Me, you and others, these are just
real Objects which are termed as Person. What I can say is that theoretical
description of any object is Abstraction. When you talk abt Abstraction
we talk about "What" not "How". You do
not need to be worry abt the details and complexity but need to represent
it in a simple , easy and understandable. .
Encapsulation is more related to the
implemenation. That is "How" . When you provide interfacing
then you are telling the outer world that I will provide you this interface
you just use it and do not bother about the internals. It says I
will hide the data/implementation from you. If I change anything internall
in my implemenation it will not affect you. I have given you interface
that will remain same. One more intersting thing I read from somwhere which
says that Encapsulation is to keep the information private not secret.
What you do in the bathroom is not secret but private.
So my conclusion is that Abstraction
is virtual and Encasulation is practical. What vs How.
Class name is abstraction
Class interface(published/exposed
portion) is Encapsulation
I am not sure whether you are satisfied
by it or not..
Please recitify me whereever I am wrong
or left any thing.
Regards,
Kuldeep Singh
Tata Consultancy Services
Plot No. 362-363,
Phase-IV,
Udyog Vihar,
Gurgaon - 122016,Haryana
India
Cell:- +919873722636
Mailto: kulde...@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Outsourcing
____________________________________________
ForwardSourceID:NT00004D7A
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you