Please read the remarks about programming problems for this course.


You will implement a hash table that can use either linear or quadratic probing to resolve collisions. You are not to use external chaining with linked lists for this assignment.

Create the hashtable.cpp file that implements the methods specified in the file hashtable.h The comments within this file indicate what the methods do and what parameters they expect. The file test_hashtable.cpp is provided for your convenience for testing your code.

As usual, you may not modify hashtable.h. You are encouraged to modify test_hashtable.cpp—for example, use the hashpjw function, experiment with quadratic probing, and use a bigger (prime-sized) table.

Your hashtable.cpp file should be perfectly compatible with hashtable.h.

In this assignment you gain experience with several modern C++ types: std::shared_ptr (a smart pointer with automatic memory management) and function (similar to a C function pointer but with additional capabilities).

Please submit only your hashtable.cpp file to eclass.e.southern.edu.