Hello there. I'm interested what is abstract data type in programming ?
ADT -> abstract data typesWhat is it?
Page 1 of 1
5 Replies - 1564 Views - Last Post: 26 May 2010 - 03:14 PM
Replies To: ADT -> abstract data types
#3
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,
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
//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
#4
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.
#5
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.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|