This project tests your programming ability, your ability to code in Java, your knowledge of simple data structures, and how well you can read and follow instructions. This project is a typical undergraduate project, but with a shorter deadline. If this project is not easy for you, this course may overwhelm you. This project is a good way for us to get to know each other. :)
Your goal is to produce a simple Java implementation of a dictionary interface similar to Java's built-in Map<Key,Value> interface. The interface is called DoubleKeyMap<Key1,Key2,Value> (attached below) and the implementation is called DoubleKeyHashMap<Key1,Key2,Value>.
You should test your your code well including all boundary conditions as you will not see the test harness I will use to check out your project.
You must implement this project successfully without knowing precisely how I will test it. There are many reasons:
This project is primarily meant to test your basic Java skills:
IMPORTANT: You are to actually implement a hashtable using an array of LinkedList<T> containing wrapper objects that wrap the 2 keys and the value using a technique called separate chaining. Do not simply wrap Java's existing Map interface. For example, my solution uses a helper class like this:
You will create a jar file called map.jar containing *.class files and place in a directory called map/dist under your cs680 dir:
Pur your source Java code in map/src:
When testing, i'll use my own DoubleKeyMap.
To jar your stuff up, you will "cd" to the directory containing your source code (perhaps map/src) and create the jar in the map dir:
To learn more about submitting your project with svn, see Resources.
You will see something like this:
You should test your project by running as I will run it per the Grading section below.
You are creating a library, NOT a main program. Your code should not generate any output. You must submit your source code for credit.
I will run your program by pulling your map.jar file from the repository and running like this:
It will launch my TerencesTestRig.main() method and I will check the results.
Here's an example of how to use the new map interface:
You may discuss this project in its generality with anybody you want and may look at any code on the internet except for a classmate's code. You should physically code this project completely yourself but can use all the help you find other than cutting-n-pasting or looking at code from a classmate or other Human being.
I will deduct 10% if your program is not executable exactly in the fashion mentioned in the project; that is, class name, methods, lack-of-package, and jar must be exactly right. For you PC folks, note that case is significant for class names and file names on unix! All projects must run properly under linux. That means it's a good idea to test it there yourself.