The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+22 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 (52k points) | 2.5k views

4 Answers

+36 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.

Correct Answer: $C$

answered by Active (2.6k points)
edited by
Thank You. So Answer is C part.
Why not b and c?
+6 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)
+4 votes
ans c)
answered by Loyal (5.2k points)
–3 votes
D. all of the above
answered by (119 points)

@Manali Sikdar can you elaborate your points a little bit about ADT being imstantiatei.As the link provided by you is now no more working.


Related questions

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
49,540 questions
54,100 answers
71,007 users