The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+19 votes

An Abstract Data Type (ADT) is:

  1. same as an abstract class
  2. a data type that cannot be instantiated
  3. a data type for which only the operations defined on it can be used, but none else
  4. all of the above
asked in DS by Veteran (59.5k points) | 1.7k views

4 Answers

+31 votes
Best answer

An abstract data type (ADT) supports only the operations which are defined.

Abstract class is one that may not have definitions of all the objects it have. Moreover it can not be instantiated. To instantiate we have to create a subclass then instantiate the class.

Abstract Data Type is  like data structure  eg. $STACK$ where we have $PUSH()$ $POP()$ operation defined .

Hence, they are not the same thing.

answered by Active (2.6k points)
edited by
Thank You. So Answer is C part.
Why not b and c?
+4 votes

ADT of any data structure is "what operation stacks you can perform on this data structure."

for ex:

ADT of stack:

(1) push()

(2) pop()

ADT of queue:

(1) enqueue

(2) dequeue

answered by Active (4.3k points)
+2 votes
ans c)
answered by Active (5.2k points)
–2 votes
D. all of the above
answered by (121 points)

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

38,079 questions
45,572 answers
49,045 users