Lab 2

Due 9:30AM September 17, 2007

  1. Implement and test a class Item that implements the Comparable interface and contains two data members: a String and an int. Provide get and set methods for both data members as well as a method compareTo. The compareTo method will compare two Items by comparing the String objects stored in the Items.
  2. Implement and test a SortedArray class that maintains an array of Item objects (from question 1) in sorted order. Include the following methods:


Sami Rollins