Educational Objectives: After completing this assignment, the student should be able to accomplish the following:
============================================================== rubric to be used in assessment -------------------------------------------------------------- Hash Table build fhtbl.x [0..10]: xx fhtbl.x t.50.com1 [Load, Dump] [0..5]: x fhtbl.x t.100.com2 [Load, Remove, Size] [0..5]: x fhtbl.x t.100.com3 [Load, Traverse] [0..5]: x fhtbl.x t.100.com4 [Load, Retrieve] [0..5]: x fhtbl.x t.100.com5 [Load, Includes] [0..5]: x fhtbl.x t.100.com6 [Load, Get, Put] [0..5]: x log [-50..5]: x requirements and SE [-50..5]: x dated submissions deduction [2 pts each]: ( x) -- total: [0..50]: xx ==============================================================
Background Knowledge Required: Be sure that you have mastered the
material in these chapters before beginning the assignment:
Introduction to Sets,
Introduction to Maps,
Hashing, and
Hash Tables.
Operational Objectives: Implement the template adaptor classes HashTable<K,D,H> and HashTableIterator<K,D,H>.
Deliverables: Two files:
hashtbl.h # contains HashTable<> and HashTableIterator<> template classes (including implementations) log.txt # your project work log
The official development/testing/assessment environment is specified in the Course Organizer.
Create and work within the subdirectory ~/cop4530/proj6.
Do your own work. Variations of this project have been used in previous courses. You are not permitted to seek help from former students or their work products. For this and all other projects, it is a violation of course ethics and the student honor code to use, or attempt to use, code from any source other than that explicitly distributed in the course code library, or to give or receive help on this project from anyone other than the course instruction staff. See Introduction/Work Rules.
Begin by copying the entire directory LIB/proj6 into your proj6 directory. At this point you should see these files in your directory (along with others to be mentioned later):
fhtbl.cpp # test harness for hash tables rantable.cpp # random table generator hashcalc.cpp # hash calculator hashtbl.start # starting point for hashtbl.h makefile.ht # build hash table project deliverables.sh # submission configuration file
Then copy these relevant executables:
LIB/area51/fhtblKISS_i.x # fhtbl_i.x with KISS hash function LIB/area51/fhtblMM_i.x # fhtbl_i.x with MM hash function LIB/area51/fhtblSimple_i.x # fhtbl_i.x with Simple hash function / non-prime flag LIB/area51/hashevalKISS_i.x # hash analysis with KISS LIB/area51/hashevalMM_i.x # hash analysis with MM LIB/area51/hashevalSimple_i.x # hash analysis with Simple/non-prime LIB/area51/rantable_i.x # random table generator LIB/area51/hashcalc_i.x # hash function calculator
The executables in area51 are distributed only for your information and experimentation, as well as the exercises in the lecture notes. You will not use these files in your own project, but they will help you understand hashing and hash tables and are very useful in preparing for the final exam. When you have questions about behavior of either hash tables or the router simulation, use these executable to find the answer.
You are to define and implement the template classes HashTable<K,D,H> and its associated iterator class HashTableIterator<K,D,H>.
File hashtbl.h should contain the definitions and implementations of the template classes HashTable<K,D,H> and HashTableIterator<K,D,H>. Note that a lot of this work is already done in the startup file.
The makefile makefile.ht builds the supporting test infrastructure for hash tables. You can test different targets individually by naming them as an argument to the make command.
Submit the assignment using the script LIB/scripts/submit.sh.
Warning: Submit scripts do not work on the program and
linprog servers. Use shell.cs.fsu.edu to submit assignments. If you do
not receive the second confirmation with the contents of your assignment, there has
been a malfunction.
Implement the HashTable<K,D,H> and HashTableIterator<K,D,H> classes as defined in the file LIB/proj6/hashtbl.start using the implementation plan discussed in the lecture notes. (Search for "TBS" to locate the places where additional code is required.)
Be sure not to change the definition of HashTable<> from that distributed in LIB/proj6/hashtbl.start.
Note that HashTableIterator is a ConstIterator type, so that only the const versions of operator * and Retrieve() exist.
Place all hash table code, including definitions and implementations for both hash table and hash table iterator, in the file hashtbl.h.
Thoroughly test your implementation for correct functionality using the provided test client fhtbl.cpp and tables generated with rantable.cpp. Test with small and large tables (at least 100,000 entries).
Start NOW on HashTable<K,D,H> and test it. Future assignments will be based on your implementation, and you need to be sure it is working correctly before moving on.
A client test program for HashTable<K,D,H> is distributed as tests/fhtbl.cpp. This will be compiled directly from the course library when you enter the command "make fhtbl.x". However, you should copy the source code into your project directory and read the code.
A random table file generation program is supplied as rantable.cpp.
Sample executables are supplied in LIB/area51. Test tables can be created with rantable.cpp.