Hash Tables
You will add the remaining function bodies ot Hash_stu.cpp for the Functions defined in Hash.h
in your lab you only completed a few of them
constructor
use a for loop to set the entire array to EMPTY_VALUE
destructor
log start and end
empty()
does the count==0
full
does the count == MAX_CAPACITY
search
return true or false if the value was found
insert
add a value to the hastable
remove
remove a value from the hashtable
copy over all the files provided for you in the Homework directory then copy ONLY Hash_stu.cpp,Hash.h and your main from your lab
you want to be ABSOLUTELY SURE you are not using the Hash.o and Makefile from the lab, DO NOT copy over Hash.o
When searching, inserting or deleting from the hash table you will use the following order
to resolve the correct position in the hashtable
1st position hash1 % MAX_CAPACITY
2nd position hash2 % MAX_CAPACITY
3rd position (hash2 +5) % MAX_CAPACITY
4th position (hash2 +10) % MAX_CAPACITY
5th position (hash2 +15) % MAX_CAPACITY
and so on
when you are searching or deleting you keep looking till you find the value you are looking for or an empty position
when you are insering you will look for the first empty or deleted position
NOTE why mod with MAX_CAPACITY, so it starts over again at the start
if you keep adding 5 every time you dont find a position you can use eventualy it will be greater than MAX_CAPACITY
so as soon as it is greater it will start back at 0 if you use % MAX_CAPACITY