(10) Collection Abstractions

(10) Collection Abstractions - Collections CMSC 132:...

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

View Full Document Right Arrow Icon
1 CMSC 132: Object-Oriented Programming II Collection Abstractions and Java Collections Department of Computer Science University of Maryland, College Park 2 Collections Programs represent and manipulate abstractions (chunks of information) Examples of abstractions are a roster of students, a deck of cards, an image One of the most universal abstractions is a collection , which just represents an aggregation of multiple objects, plus, perhaps, a relation between elements Examples of collections with different properties are a list, a set, an ordered set, a map, an array, and a tree Collections support various operations, and different types of collections support different operations 3 Data structures A data structure is just a way of representing and storing information in a program The choice of data structure affects The abstractions supported The amount of memory required to store data Which operations can be efficiently performed Collections may be implemented using many different data structures 4 Graph abstractions A many-to-many relationship between elements Each element may have multiple predecessors Each element may have multiple successors many successors many predecessors
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/16/2011 for the course CMSC 132 taught by Professor Padua-perez during the Fall '08 term at Maryland.

Page1 / 5

(10) Collection Abstractions - Collections CMSC 132:...

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

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