wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Really is there any diff bwn Data Abstraction and Data encapsulation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Really is there any diff bwn Data Abstraction and Data encapsulation?" Watch "Really is there any diff bwn Data Abstraction and Data encapsulation?" New topic
Author

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

ram kumar
Ranch Hand

Joined: May 22, 2008
Posts: 146
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


Discussion - the powerfull way to excellence!
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3355

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.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
ram kumar
Ranch Hand

Joined: May 22, 2008
Posts: 146
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Really is there any diff bwn Data Abstraction and Data encapsulation?