5 Replies - 1921 Views - Last Post: 26 May 2010 - 03:14 PM

#1 alecoder  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 50
  • Joined: 11-January 08

ADT -> abstract data types

Posted 25 May 2010 - 09:26 AM

Hello there. I'm interested what is abstract data type in programming ?
Is This A Good Question/Topic? 0
  • +

Replies To: ADT -> abstract data types

#2 singularity  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 184
  • Joined: 17-October 08

Re: ADT -> abstract data types

Posted 25 May 2010 - 12:00 PM

View Postalecoder, on 25 May 2010 - 03:26 PM, said:

Hello there. I'm interested what is abstract data type in programming ?


So simple ADT
Was This Post Helpful? 0
  • +
  • -

#3 alias120  Icon User is offline

  • The Sum over All Paths
  • member icon

Reputation: 122
  • View blog
  • Posts: 700
  • Joined: 02-March 09

Re: ADT -> abstract data types

Posted 25 May 2010 - 05:56 PM

One way of creating abstract types is by defining them as pure virtual. For instance, implement inheritence among a base and derived class. Define a function in your base class that is pure virtual,
//C++

virtual void getVal() = 0; //pure virtual functions are initialized to 0.




Once defined as a pure virtual function, the base class cannot be directly initialized (though you can still create pointers to your base class). This creates an abstract base class, sometimes called an interface class. The pure virtual functions can serve as blue prints for your derived classes. The following link will provide more detail on this particular topic.

http://www.learncpp....erface-classes/


-alias

This post has been edited by alias120: 25 May 2010 - 05:57 PM

Was This Post Helpful? 0
  • +
  • -

#4 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

Re: ADT -> abstract data types

Posted 26 May 2010 - 01:24 PM

ADT's are, well ADT's... I believe a Linked list is one, pure virtual functions, as mentioned above, Binary Tree's... Just use the bove link that lease you to a google search.
Was This Post Helpful? 0
  • +
  • -

#5 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Re: ADT -> abstract data types

Posted 26 May 2010 - 01:31 PM

In the most common context, ADTs are any type of data structure (in theory, although I have heard people refer to implementations as ADTs as well). It doesn't mean specific language quirks like abstract classes and whatnot. The abstract refers to our visualization and subsequent interpretation of the data. It's all ones and zeros at the bottom, we're the ones making stacks, trees, and tables.
Was This Post Helpful? 0
  • +
  • -

#6 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: ADT -> abstract data types

Posted 26 May 2010 - 03:14 PM

http://en.wikipedia....ract_data_types
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1