/* ============================================================================ Name : Exam3.c Author : David Mutchler and YOUR-NAME-HERE Description : An exam problem on a simple implementation of a hash map. ============================================================================ */ #include #include #include "Dog.h" #include "DogMap.h" int main(void) { // TODO (3 points): Prompt for and get an integer n from the user. // TODO (3 points): Use constructHashTable to construct // and store a hash table of size n. // TODO (3 points): Insert pointers to X random Dogs into the hash table. // (See constructRandomDog in the Dog class for obtaining random Dogs.) // Keep track of the number of collisions during the insertions. // Try various values for X, like: // -- n/10 (you will probably not see many collisions) // -- n/2 (you should see some collisions, especially if n is 1000 or larger) // -- n (you should see some collisions - many if n is large) // -- 2*n (you should see many collisions) // TODO (3 points): Print how many collisions occurred in doing the insertions. return EXIT_SUCCESS; }