Concept of Abstraction

Abstraction is one of the concept of Object Oriented Programming.
In simple terms Abstraction means showing only functionality to user and hiding internal details.End user will not come to know how a particular functionality is implemented .Concentrate on how to use a function rather to think how function is coded.

How to achieve Abstraction ?
Abstraction can be achieved in following two ways:
  • Abstract Class
  • Interfaces
Abstract class:
  • Abstract class is a class which is declared with keyword Abstract and this can not be instantiated.
  • Can have abstract or non abstract methods
  • Abstract class achieves 0 to 100% abstraction.
Interface :
  • Interface is a class which is declared with keyword Interface and has only abstract methods.
  • Interface is a contract /rules /blue print of a class
  • Interface achieves 100% abstraction.

Replies

  • Kaustubh Katdare
    Kaustubh Katdare
    #-Link-Snipped-# - I guess it'd be more interesting and useful if you could post some code showing the concept in action. That should help lot of fellow newbie programmers. 😀
  • Mukta Madankar
    Mukta Madankar
    Learn the Design Pattern - you will understand the difference well. Show us some code explaining the same, It would be helpful for us to understand the concept you explained here.
  • WARDHAMAN BEDMUTHA
    WARDHAMAN BEDMUTHA
    Kaustubh Katdare
    #-Link-Snipped-# - I guess it'd be more interesting and useful if you could post some code showing the concept in action. That should help lot of fellow newbie programmers. 😀
    thanks a lot for your suggestion , I will try to explain with the aid of examples.

You are reading an archived discussion.

Related Posts

Hello friends I have just completed my B.E.(I.T.). I have knowledge of html,css,javascript and core php. I want to become fulltime freelancer but I haven't any professional experience. Pls Advice...
Charging our gadgets with metal exteriors wirelessly was not possible, until now. All the wireless charging technologies available failed to become compatible with devices having metal bodies. In the latest...
If I send an auto cad drawing,can anybody help me by carrying out analysis of the said item? Please let me know the same.
Hi all Crazy Engineers I am Vinay I did B.Tech in ECE in 2014 I wasted 1year in GATE What should i do now 1.should i go for job search...
Gionee has quietly launched a new smartphone in India called the Pioneer P2M. Featuring a 4 inch display with 800 x 480 pixel WVGA resolution, the Gionee Pioneer P2M features...