COMPSCI 61B Lecture Notes - Lecture 11: Subtyping, Access Control, Type System

83 views4 pages

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)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers