COMPSCI 61B Lecture Notes - Lecture 11: Subtyping, Access Control, Type System
Document Summary
Specify a contract for common behavior shared by many data structures (e. g. implementing ourcomparable means dogs can be compared) Provide a way to containerize common functions (e. g. the o byn. Charactercomparator lets us compare two characters in a special way. An abstract data type (adt) is de ned only by its operations, not by its implementation. Deque adt: addfirst, addlast, isempty, size, printdeque, etc. Supports the following operations: push(int x): puts x on top of the stack int pop(): removes and returns the top item from the stack. Linked list implementation will result in faster overall performance since it doesn"t need to worry about resizing. Array implementation will result in faster overall performance since it is easier to retrieve items. Among the most important interfaces in the java. util library are those that extend the. Mappings between item, e. g. jhug"s grade is 88. 4. Known also as associative arrays, associative lists (in lisp), symbol tables, dictionaries (in python)