Question

After reading this essay OOP vs ADT, I have not quite well understood what is ADT all about and how it is connected with the interface concept. Can anyone explain the difference between these concepts with some code examples (Java or Scala would be great).

Was it helpful?

Solution

An abstract data type (ADT) is a mathematical model for a certain class of data structures that have similar behavior; or for certain data types of one or more programming languages that have similar semantics. An abstract data type is defined indirectly, only by the operations that may be performed on it and by mathematical constraints on the effects. Abstract datatype is not necessarily an OOP concept. It is an older term to describe the concepts of for example Stack and Queue in terms of their functionality, without describing the implementation.

From the link:- AbstractDataTypes

And an object is an istance of a class

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top