Computer Science 210
Data Structures
Fall 2016, Siena College
Lecture 25: Ordered Structures
Date: Friday, November 4, 2016
Agenda
Lecture 25 Assignment
Due at the start of class, Monday, November 7.
Please submit answers to these questions in
Blackboard under "Lecture 25 Assignment" by the start of
class. We will discuss these questions at the start of class, so no
late submissions can be accepted.
- Consider the following three options:
- a standard Vector
- a MyVector from the sorting lab, which is capable of
sorting its contents on demand (by calling the sort method)
- an OrderedVector, which might be thought of as a
MyVector that automatically sorts during/after each
modification to its contents
Given a set of data which is modified periodically and printed in
order periodically, describe briefly the circumstances (relative
frequency of modifications and printouts) where each of the above
three approaches might be beneficial. (9 points)
- Under what circumstances would a get method as described in
Bailey question 11.13 on p. 274 be more useful than the existing
contains method? Write a get method for
OrderedVector. (6 points)
Terminology
- ordered structure
- encapsulate