8,813 views
0 votes
0 votes

Wikipedia says:

https://en.wikipedia.org/wiki/Abstract_data_type#Examples

 integers are an ADT, defined as the values …, −2, −1, 0, 1, 2, …, and by the operations of addition, subtraction, multiplication, and division

In that case all known data types can be considered as abstract, can't they?

can anyone please provide a simple definition of abstract and conceret data types with example!

1 Answer

1 votes
1 votes

A concrete data type is absolutely defined. only certain inputs and outputs can exist in this. 
examples are Boolean, Integer, Floating Point, Text, etc.. 
Arrays, lists and trees are concrete datatypes.

Stacks, queues and heaps are abstract datatypes. They are just ideas, i.e. "black boxes" with a defined behavior. To implement them, you have to choose a suitable concrete datatype.;
Abstract Data types can be constructed from known - or unknown data. 

examples of an abstract data type might be an array: 
an array can consist of a number of Booleans, integers, Alphanumeric, Text, or even arrays. 

  • stacks and queues can be implemented by arrays or linked lists.
  • A heap can be implemented by an array or a binary tree.