Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Really is there any diff bwn Data Abstraction and Data encapsulation?

 
ram kumar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wraping up of data and functions is called data encapsulation !

Agreed ! so a class is encapsulated!

Abstraction refers to act of representing essential features without showing the details of implementation.

What do you call this as ?

Abstract class/
Interface
Methods
Classes again or what it is actually ?

Even in a class, as per my understanding, we can say an object is an abstraction of class,

Justifying as :

Objects call methods and it does not show how the implementation is made in the method to modify the data!

Right!

So, if am wrong or right ? would you just support me? with justifications.

thanks techies
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ram kumar:
Wraping up of data and functions is called data encapsulation !

Agreed ! so a class is encapsulated!


Very true!


Abstraction refers to act of representing essential features without showing the details of implementation.


True again!


What do you call this as ?

Abstract class/
Interface
Methods
Classes again or what it is actually ?



What exactly is your question? Do you have a doubt in what they are called as ?


Even in a class, as per my understanding, we can say an object is an abstraction of class,


No. Object is an instance of a class! It is of course an existing real representation of the conceptual blue print!


Justifying as :

Objects call methods and it does not show how the implementation is made in the method to modify the data!

Right!


I think you have mistaken the term "hiding the implementation". It is something like "code to an interface".

That means, you expose just what methods are available and what arguments are to be passed and what is the return value of a method. That's all. No matter how they are implemented as it is purely left out to the implementing class of the interface.
 
ram kumar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got your point! thanks ! that was cool !

Originally posted by Raghavan Muthu:


I think you have mistaken the term "hiding the implementation". It is something like "code to an interface".



That means, you expose just what methods are available and what arguments are to be passed and what is the return value of a method. That's all. No matter how they are implemented as it is purely left out to the implementing class of the interface.




It is something like "code to an interface".


what does this mean ?

That means, you expose just what methods are available and what arguments are to be passed and what is the return value of a method. That's all. No matter how they are implemented as it is purely left out to the implementing class of the interface.


Can i say methods to be example of data Abstraction !

Please correct if am wrong

Even in interfaces we know the method name and nothing else , can i call it as an example of data abstraction
[ June 26, 2008: Message edited by: ram kumar ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic