Computer Science, asked by Sachinrayf6026, 1 year ago

What is abstract data type in data structure with example?

Answers

Answered by rajbordoloi
1
✍An Abstract Data Type (ADT) is an abstract class. It cannot be instantiated (in an ideal programming language) and is useful only when extended. They are like Java's interfaces. You can specify the general characteristics of your class but can use it only as a base for other classes (which may be abstract or concrete).

Example: Suppose you have a base class called Animal which you suppose to use as a base for Cat, Dog, etc. In this case, the Animal class all by itself is useless but helps significantly in structuring inheritance. Animal is an ADT.

I HOPE IT HELP___☺
Similar questions