import rebelsky.io.SimpleOutput;
import rebelsky.util.ComparableString;

/**
 * A simple test of the animated quicksort routines provided by
 * QuicksortableVector.java.
 * Copyright (c) 1998 Samuel A. Rebelsky.  All rights reserved.
 *
 * @author Samuel A. Rebelsky
 * @verstion 1.0 of March 1998
 */
public class Quicksort
{
  public static void main(String[] args) 
    throws Exception
  {
    // Oh boy!  Output!
    SimpleOutput out = new SimpleOutput();
    // The sortable vector.
    QuicksortableVector stuff = new QuicksortableVector();
    // Verify the number of parameters
    if (args.length == 0) {
      out.println("Usage: ji Quicksort string1 string2 ... stringn");
      System.exit(1);
    } // if
    // Append all the parameters
    for (int i = 0; i < args.length; ++i) {
      stuff.addElement(new ComparableString(args[i]));
    } // for
    // And sort!
    stuff.quickSort(out);
  } // main
} // Quicksort
