CS 241: Java Provided Code for Lab 1


The following files are being provided:
o Lab1b.java --- the portion of the driver provided is here

o Sort.java --- this is called to do the sorting neededin preprocesing

o Point.java --- code for Point class

o FastClosestPair.java --- This is where you'll put your implementation of the divde-and-conquer closest pair algorithm

o Comparator.java --- This is an abstract class used to give the sort routine a comparison function to compare two points

o XComparator.java --- This is a subclass of Comparator in which the x-coordinate is used to compare the two points

o YComparator.java --- This is a subclass of Comparator in which the y-coordinate is used to compare the two points

o Terminal.java --- This is the provided terminal class to get input and output from a command line or from a file. Note that the provided driver demonstrates how a command line argument can be used to have the output go to a transcript file and/or the input read from a provided file


Return to the CS 241 Home Page