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

what exactly is abstraction in OOPS

 
deepak carter
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where else but Wikipedia? Abstraction_(computer_science) You'll even find a section headed "Abstraction in object oriented programming".
 
Rinkit Shah
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 256
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48968
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic