{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lecture21 - Administrative Issues Introduction to Data...

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

View Full Document Right Arrow Icon
Introduction to Data Structures Lecture 21 Administrative Issues Program 4 due tomorrow at 11pm Final exam review tomorrow Exam similar format to midterm Open notes, Open book Test is comprehensive Covers material both before and after midterm More details on coverage during review BRING QUESTIONS! Exam scheduled for Monday, 6/23 at 8am-11am Data Structures Organization and management of data is fundamental to programming Data structures are the ways that data can be organized and used Many data structures have been developed • Examples – Arrays – Multidimensional Arrays Collections • A Collection is an object that stores other objects – Arrays ArrayList Generic term, but most collections provide similar services – add, remove, retrieve, etc. – These services are the interface to the collection Collections Two varieties of collections – Homogeneous Every element in the collection is of the same type – Heterogeneous A mixture of types can be stored in the collection ArrayList , for example, stores Object references – Polymorphism – Inheritance Collection Ordering Some collections have a defined order – Arrays for example Others are unordered – No element is “first” or “last”
Background image of page 1

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

View Full Document Right Arrow Icon
Collections Some many choices! – Heterogeneous vs. Homogeneous – Ordered vs. Unordered – Arrays or ArrayList or something else? What collection should be used? – Depends on the situation… – Each is a tool in your toolbox Which loop to use? Which sorting algorithm to use? One Data Structure, Different Implementations Data structures can often be implemented in different ways Just like problem solving – Same problem – Multiple solutions Important to separate interface from implementation Typical Collection Interface The interface describes the possible operations Add an object Remove an object Look at an object Find an object Inspect all objects The interface should remain constant Hides details of implementation ADTs ADT stands for Abstract Data Type – ADTs are data structures – Collection of data
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}