[an error occurred while processing this directive]
Lab 1
CS 5631, Spring 2004
Due Tuesday, January 27 (20 points)
Introduction
For this lab, you will write three Java classes and configure your
Unix account so that you can use classes that I have written in your code.
The classes that you will write are
- VectorSorter - this class sorts a Vector using a quicksort algorithm.
A Vector is a Java standard library object.
It is similar to an array, but there is no limit to the number of entries
that it can hold.
- Test1 - this class provides a
main()
method for testing
the VectorSorter class.
It builds a Vector of Integers and uses the VectorSorter class to sort
them.
- Test2 - this class provides another
main()
method for
testing the VectorSorter class.
Its code is almost identical to the Test1 class except that it builds a
Vector of Strings.
Developing the VectorSorter Class and its Test Classes
An outline of your code development is shown below.
Follow the links for details on individual steps.
- Step 1 -
Setting up your class path and compiling simple versions of the
VectorSorter and Test1 classes.
- Step 2 -
Constructing and printing a test vector of integers.
- Step 3 -
Adding code for sorting a vector.
- Step 4 -
Sorting a vector of strings.
You should do your code development logged onto a Unix machine, either
directly or using the XWin32 program.
If you want to do work at home without logging onto a Unix machine you
should talk to your TA or me after class.
What to turn in
When you have completed the assignment, make a typescript with the
items listed below.
- The Java code file VectorSorter.java
- The Java code file Test1.java
- The Java code file Test2.java
- Output from running the main program in the Test1 class.
- Output from running the main program in the Test2 class.
[an error occurred while processing this directive]