• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

what are the advantage of abstraction in OOP?

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is the advantage of abstraction in OOP?
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found one.
It is reusability.
is there any other things?
 
author & internet detective
Posts: 41413
854
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Readability too. If things are properly abstracted, the reader doesn't need to retain everything in his/her head at once.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi aruna , Abstraction is mainly meant for removing the code duplication and also for supporting polymophism and also code reusability.
 
Ranch Hand
Posts: 449
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

aruna sameera wrote:what is the advantage of abstraction in OOP?



Abstraction lets you focus on what the object does instead of how it does it.
see also Abstraction
 
Anwar Hussain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Muhammad Ali Khojaye wrote:

aruna sameera wrote:what is the advantage of abstraction in OOP?



Abstraction lets you focus on what the object does instead of how it does it.
see also Abstraction



hey , link you sent was pointing towards my point i.e abstraction eliminates duplication of code. Have you read the link topic before sending it???
 
Muhammad Khojaye
Ranch Hand
Posts: 449
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes i know
and i am more focus on "Abstraction in object oriented programming".
 
Anwar Hussain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please give me one example where in abstraction is to hide the implementation details from user as you said.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Anwar,

Hiding implementation details means not from user. It hides implementation logic from another class.

The other class doesn't need to know about the logic. It simply uses the class without knowing about implementation. Even any update to the logic doesn't require modification of another class. Its called as hiding implementation details.

Regards,
Ant
 
Ranch Hand
Posts: 32
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Abstraction provides necessary properties and operation of an Entity
 
Anwar Hussain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ant,

Then every programming language in existance supports abstraction. Is't it??? Abstarction is a feature of OO language.But every language is not OO. Getting my point.

 
Muhammad Khojaye
Ranch Hand
Posts: 449
Scala IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consider the collection framework that defines the abstraction called java.util.map. It defines an abstract view of an object that maps from one set of objects in to another. Different classes like java.util.HashMap or java.util.TreeMap implements the Map abstraction.
we generally implement abstraction using interfaces or abstract classes, and then provide implementation elsewhere to hide the details.
 
Anwar Hussain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May i know why the implementation details should be hidden. And also whom form you are hiding the implementation details.
The developer who implements the abstraction knows abt the implementation details. Iam confused about this hiding in java.
 
Let's go to the waterfront with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic