I need a hash table template (for use with other programs) and an interactive telephone lookup program.
There are several kinds of hash table; the kind described here uses “separate chaining??. A “hash value?? is calculated from the key. The hash value is much smaller than the key. Different keys may generate the same hash value. The hash value is used to index into an array of singly linked lists. Each entry in the list contains the key and data for an entry which has the same hash value.
To add an entry the hash table, compute the hash key and add the entry to the list indexed by the key. To find an entry, compute the hash key and then walk down the list of entries indexed by the hash key until the matching key is found. To remove an entry, find it and remove it from the list. Write a class template which will implement a hash table. Allow the user to specify the class to be stored in the hash table, the class of the key, and the number of entries in the array of lists. The key class should provide a member function hash() which will compute the hash value, as well as defining operator== which will compare two key values.
Use this template to implement an interactive telephone list. Use the person’s name as the key. When found, display the matching telephone number. If not found, ask if a new entry is to be created.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Complete ownership and distribution copyrights to all work purchased.
## Platform
Should be standard C++ code and should compile with g++