CS3240: Data Structures and Algorithms

Hashing Exercise

PEER GRADED

due March 5

Create a hash function for an arbitrary input string to store into an Array implementation of a Hash Table of a fixed size of 100 elements. Implement this in C++ with a console application asking for input into the hash function to be stored as well as an option to print out the current Hash Table.

Implement an array based Hash Table as a class called HashTable. It must have a hashing function that lets you insert new items into the hash table. You must document what the hash function is in your working.doc document as well as discuss how you handle collisions.

Deliverables

  1. Show in class to peer grader
  2. Take snapshots of system working and printouts - put in a document called working.doc. Must include testing running a minimum of 2 times (hence with different set of 100 random numbers).
  3. Upload code in a zipped file called code.zip to blackboard Exercise


Evaluation

  1. This exercise will be graded by a peer (fellow student) during class. You must be present on the due date of this exercise hence to get credit on it and to participate in the grading of another student's work. (Only Valid DOCUMENTED Excuse will be allowed for missed peer grading and must be approved by instructor--evaluation process to be determined by instructor)
  2. During the class session when peer grading is started, the professor will disscuss a "correct" solution with the class and you will use this and guidelines presented and discussed to grade the student's work. FOR THIS ASSIGNMENT you will demonstrate your work to your grader
  3. As part of this we will explore different solutions done by students and unexpected logic errors and syntax errors.

Evaluation Guidelines

NOTE: the points on each item are given as full points if solution completely correct and 0 points if not (even if code attempted).

ITEM Points Range
Create a main function of your program that each time generates a HashTable as a console application that asks user for input into the hast table and the option to print out current Hash Table.

(+5 points)  

 

Implement an array based Hash Table as an a class called HashTable. It must have a hashing function that lets you insert new items into the hash table.

 

(+40 points)   
You must document what the hash function is in your working.doc document as well as discuss how you handle collisions. (+5 points)   

 

 

© Lynne Grewe