CrazyEngineers
  • Concept of Abstraction

    Updated: Oct 26, 2024
    Views: 1.7K
    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.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorJul 29, 2015

    #-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. 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Mukta Madankar

    MemberJul 29, 2015

    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.
    Are you sure? This action cannot be undone.
    Cancel
  • WARDHAMAN BEDMUTHA

    MemberJul 30, 2015

    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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register