• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Whats is mean by abstraction in OOPS?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is mean by abstraction in OOPS concept?
And can anybody suggest me a best site or book where i can get full info on OOPS concepts and best practices.
 
Author
Posts: 63
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The word "abstraction" could be used in two ways in OO:
- as an entity (to refer a class or an interface)
- as a principle

"The principle of Abstraction advocates the simplification of entities through reduction and generalization: reduction is by elimination of unnecessary details and generalization is by identification and specification of common and important characteristics."

you may take a look at enabling techniques defined for each fundamental object-oriented principle here; these enabling techniques may help you understand the principles easily.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, Wikipedia should help you: https://en.wikipedia.org/wiki/Abstraction_(computer_science)#Abstraction_in_object_oriented_programming

From myself I can explain it by example.

I don't know you. I never met you. I don't know where do you live. I don't know whether you're a man or a woman. I don't even know whether you're a human being or a computer bot.

But I'm writing this message to you now.

All I need in order to do this is to abstract myself away from who you really are and deal with your abstraction in my head and in this website.

This abstraction in my head knows how to read my messages. That's all I need to know about you.

Thus, abstraction is a simplification of real world things in order to make more digestible
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In addition...

Details change frequently.
Abstractions tend to change far less frequently.

With that being the case, the less your system has to know about itself and the specifics of it's implementation, the less dependant your implementation details will be on other implementation details - relying on abstractions instead.

This makes your code less coupled (a good thing) and less brittle. If you need to change an implementation detail without changing it's abstraction, then you can often do so without breaking anything. If your code is tightly coupled (because it knows too much about itself) then you'll likely end up performing shotgun-surgery because what should be a simple change has rippling effects throughout the rest of the code which has become dependant on that little detail which has changed.
 
Evil is afoot. But this tiny ad is just an ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic