Lab 4 - Comparators are my favorite Sort of Vectors
Due: Wednesday, October 13, 2004 at 9:00 AM


Short Answers

Complete the following problems from the book and turn them in as a text file lab4.txt at the start of lab.

4.20, 4.22, 5.4, 5.6, 5.18

Lab Program

Do the laboratory at the end of Chapter 5. Come to lab with a handwritten sketch of your sort method. Think about which method to use and how you will modify it to use Comparators instead of base types or Comparables.

For part three of the lab procedure, write two applications. They should each work on a different data file and each should perform two or three "interesting" sort processes. Both will use the same MyVector class, but each application will call its own class for encapsulating the data objects you are working with, and a number of Comparators to sort the data in different ways.

You may choose from the data files I have provided in the "labs/comparators" directory in the cs136 area on cortland or in my shared area on FreeBSD. See the README file there for more information. You may also use some other data that you find interesting. If you have ideas about this, check with me before or during lab to make sure it's a reasonable thing to do.

When you're finished, create and submit a tar file lab4.tar that includes the following: