Advantages of Abstract Data Types (ADTs)

Thiago Santos Figueira
2 min readFeb 18, 2021
by Денис Марчук from Pixabay

Hello, everyone!

Abstract data types (ADTs) offer a high-level view of a concept. They define a set of values and operations without specifying how to represent them (Eck, 2019, p. 454). This definition diverges from concrete data types (CDTs) because they encompass direct implementations we can rely on (Clinger, n.d).

Examples of abstract and concrete data types include:

  • The char[] type in Java is concrete: we know it represents an array of characters with fixed length starting at index zero .
  • The List type in Java: we do not know how the List type is implemented (it could use a LinkedList or an ArrayList implementation, for example), but we have a set of operations we can perform on Lists, which include: inserting a new element, accessing elements by an integer index, and searching for elements of the list (Oracle, 2021).

Clinger (n.d.) states that abstract data types have some advantages over concrete ones when it comes to software development:

  1. They are independent: since the implementation details are not visible, the rest of the program is independent of the ADT. We can modify the ADT implementation without affecting the entire code.
  2. Modularity: the program is less dependent on the implementation of the abstract data types. In other words, it is easier to spot bugs that belong to the ADT or the rest of the program and treat them separately.
  3. Interchangeability of parts: with abstract data types, each part of the program can use the most efficient implementation that suits its necessities.

References:

Eck, D. J. (2019). Introduction to programming using Java, version 8.1. Hobart and William Smith Colleges. http://math.hws.edu/javanotes.

Clinger, W. D. (n.d.). Advantages of Abstract Data Types. Khoury College of Computer Sciences. Retrieved February 13, 2021, from https://course.ccs.neu.edu/cs5010f17/InterfacesClasses2/advantagesADT1.html?

Oracle. (2021, January 7). List (Java Platform SE 8 ). Java Documentation. https://docs.oracle.com/javase/8/docs/api/java/util/List.html

--

--