Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Data and Function abstraction

Chaitanya_PuneChaitanya_Pune Posts: 87Member
Hi,
Exactly what is Data Abstraction and Function Abstraction? Can any one give exact definition along with an easy example?

Chaitanya.

Comments

  • MT2002MT2002 Posts: 1,444Member
    : Hi,
    : Exactly what is Data Abstraction and Function Abstraction? Can any one give exact definition along with an easy example?
    :
    : Chaitanya.
    :
    [blue]
    [b]abstraction[/b] means hiding details. To look at some object
    from a higher-perspecitive.

    Data abstraction is information hiding. ie; [b]private[/b] data
    members in a class. [b]The user should not need to know about
    this data in any way. The user should ONLY access through
    the interface.[/b]

    Function abstraction is exactally the same thing; just using
    private routines. It could also refer to private imlpimentations
    (Pimp) of global routines.

    The basic idea is hiding data and routines so that the user
    cant modify/access them. This prevents alot of potential problems.
    (Like sequencial cohesion--when routine A must be called before
    routine B)--This is a perfect place to abstract.

    Abstract Data Types (ADTs) will help you decide the interfaces
    and private implimentations.

    I hope this helps;
    ~[/blue]
  • Gregry2Gregry2 Posts: 607Member
    : : Hi,
    : : Exactly what is Data Abstraction and Function Abstraction? Can any one give exact definition along with an easy example?
    : :
    : : Chaitanya.
    : :
    : [blue]
    : [b]abstraction[/b] means hiding details. To look at some object
    : from a higher-perspecitive.
    :
    : Data abstraction is information hiding. ie; [b]private[/b] data
    : members in a class. [b]The user should not need to know about
    : this data in any way. The user should ONLY access through
    : the interface.[/b]
    :
    : Function abstraction is exactally the same thing; just using
    : private routines. It could also refer to private imlpimentations
    : (Pimp) of global routines.
    :
    : The basic idea is hiding data and routines so that the user
    : cant modify/access them. This prevents alot of potential problems.
    : (Like sequencial cohesion--when routine A must be called before
    : routine B)--This is a perfect place to abstract.
    :
    : Abstract Data Types (ADTs) will help you decide the interfaces
    : and private implimentations.
    :
    : I hope this helps;
    : ~[/blue]
    :

    [green]
    if you look at it from an even lower and fundamental level, a class itself is a form of data and function abstraction, putting related data and routines in one construct, even though on the low level, it might not be that way.

    {2}rIng
    [/green]
Sign In or Register to comment.