E81 CSE 131 Lecture 8: List

32 views4 pages
magentarat813 and 20 others unlocked
E81 CSE 131 Full Course Notes
8
E81 CSE 131 Full Course Notes
Verified Note
8 documents

Document Summary

2:43 pm: an ordered collection of elements, duplication of elements is allowed. I. e. eat, study, eat, exercise, eat, sleep. Order is important: list is a parametric type. Parameterized by the kinds of things in the list. A list contains elements only of type t. T can be a more general type. Many shaped: object is the most general type of all. List can contain any type of object: syntax: Find the nth thing in the list. Find out where something occurs in the list. Find out the length of the list: no matter how the list is implemented, we should be able to perform these operations to any list operations to any list. Specific implementations may differ in how they carry out the above operations: public interface list < t > , // uses interface instead of class, // has the parametric type in the class name, // no constructors.

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

Related Documents