wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes what exactly is abstraction in OOPS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what exactly is abstraction in OOPS" Watch "what exactly is abstraction in OOPS" New topic
Author

what exactly is abstraction in OOPS

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
hi i went through some online material and refered a book and there all are referreing it with i think encapsulation so can you please let me know what exactly is abstraction.one tutorial has stated that abstraction define what we can do without defining how we can do.


an example will surely help
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Where else but Wikipedia? Abstraction_(computer_science) You'll even find a section headed "Abstraction in object oriented programming".
Rinkit Shah
Greenhorn

Joined: Aug 16, 2011
Posts: 26
Abstract Class Please have a look over here it will help you in understanding OOPS.

Another thread which might be useful on same forumCode Ranch Abstraction
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37951
    
  22
Rinkit Shah wrote:Abstract Class . . . Code Ranch Abstraction
I am afraid, neither of those two links is any good for learning about abstraction.
Praveen Kumar M K
Ranch Hand

Joined: Jul 03, 2011
Posts: 256
Perhaps you could try this, it looks legit - Abstraction vs Encapsulation

I'd like to digress here a bit. I frankly think this topic has been beaten to death(and more) for as long as OOP started its existence! These are my questions,

1) Does a programmer need to know the difference? I can see traction for this from a academic stand point, but what you hide and what you show depends on the client contract and that more or less comes to a programmer logically. I am asking this specific question because it gets asked in programming interviews!

2) If it is a contentious issue, why isn't there a gold copy of the answer? (If there is one, please send me the link)



Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Praveen Kumar M K wrote:1) Does a programmer need to know the difference? I can see traction for this from a academic stand point, but what you hide and what you show depends on the client contract and that more or less comes to a programmer logically. I am asking this specific question because it gets asked in programming interviews!


If the "programmer" you ask about is somebody who gets given detailed instructions about what classes to code and how to code them, then no. Somebody who is going to specify classes and design them does need to know what they are (not "the difference"), though. Perhaps the interviews are looking for programmers who might be promotable to designers. (However imputing competence or meaning to interviews isn't necessarily correct.)

2) If it is a contentious issue, why isn't there a gold copy of the answer? (If there is one, please send me the link)


I don't think it's contentious at all. It's just that when people don't understand a concept, they articulate their misunderstood version of the concept and then that version is out there competing with more reasonable versions. And then people read these misunderstood versions and mistake them for reasonable versions. And people defend their misunderstood versions because people get attached to their own ideas and defend them no matter what. The end result is just confusion, not contention.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37951
    
  22
Praveen Kumar M K wrote:Perhaps you could try this, it looks legit - Abstraction vs Encapsulation . . .
I don’t like that article either, I am afraid. I think the first link which Paul C gave, to Wikipedia, is the best.

Not only is there the problem of confusion which Paul C described, but also people can write any old rubbish and put it on the web and it remains uncorrected for ever.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what exactly is abstraction in OOPS
 
Similar Threads
what is the use of abatraction?
Data abstraction
memory management
Abstraction and Object Oriented Programming
What is the relation between abstraction and security?