COMP 2140 Lecture 5: 09_19_list.pdf
Document Summary
An abstract data type (adt) consists of a data structure: a collection of data its organization, structure, properties the operations that can be performed: what can be done to change, manipulate, or look at the data. Information hiding (for example, a java interface) provides a allows the adt to hide all implementation details. The proper way to implement an adt in java is using the interface mechanism (not required in this course) Not really abstract: basic structure in most languages. List is a fundamental and very useful adt, which is often used to implement other adts: Do not confuse an adt with its implementation. For example, we could use an array to implemented a list, but that does not mean the list is an array. Another method of implementing adt list (other than array) Allocate memory for another element when needed only. Linked list an item a reference to the next node in the list.