This preview shows page 1. Sign up to view the full content.
Unformatted text preview: in the Delete operation. Finding an item means that the class to which an item belongs has a way of recognizing a match. It is not the responsibility of the list to know what a match is; it is the responsibility of ItemClass . We need to make this assumption explicit somewhere. Lets add an assumption to the CRC card that ItemClass must provide a compareTo method and indicate what the results must be. Java has a 102678.0 method defined on items of class )C7>!O and other classes in the Java Library. Lets use that definition. We also need compareTo in the Find where item belongs in the sorted list. Know Length return length Print While ( more items ) Get next item Print item Delete(item) Find the item Remove the item Decrement length...
View Full Document
- Fall '10