21 - CMPSCI 187:Programming With Data Structures Lecture...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPSCI 187:Programming With Data Structures Lecture #21: Lists in the Collections Framework 28 October 2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lists in the Collections Framework • Abstract Classes and Methods • AbstractCollection and AbstractList • The Vector and ArrayList Classes • The LinkedList Class
Background image of page 2
• L&C’s pedagogical mission is to show you what lists are and how they work. • As with stacks and queues, they defne ADT’s that say what methods make a list a list, and what those methods do. We’ve now seen their ListADT , OrderedListADT , and UnorderedListADT interFaces, re±ection the distinction between lists that are kept sorted and lists that are not. • They then defne classes implementing these interFaces -- we have seen ArrayList , LinkedList , and DoubleList. (Note that the frst two are diFFerent From the classes in Collections with the same names.) In the last two lectures we’ve seen several details oF these implementations. • But lists in the Collections Framework oF the actual Java library are quite diFFerent. As a working programmer, you are more likely to use Collections.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Lists in the Collections Framework • The designers of Java wanted industrial-strength, highly Fexible data structures that could be used by a variety of programmers for a variety of purposes. They were concerned that their work be understandable and clear, but not speci±cally that it could be taught easily to undergraduates. • Like L&C, they came up with a single linked data structure to implement lists,
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/22/2011 for the course COMPSCI 187 taught by Professor Barrington during the Fall '11 term at UMass (Amherst).

Page1 / 9

21 - CMPSCI 187:Programming With Data Structures Lecture...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online