|
You will create a hash table for sorting information about students according to this: 1. Each student is represented as a node with the following information: unique id, name, address, gender. 2. The hash table will be a class where the data is represented as an array of STACK [this stack is implemented as link list], where each stack stores the nodes that have the same array index. 3. The array is created dynamically in the constructor. 4. The hash function is calculated as follow: Hash (student)= (first char of its name)+ (last char of its name) % size table;
The program must have: 1. Node declaration for the student 2. class declaration for a linked list STACK 3. Write the functions push and the destructor for STACK. 4. The class declaration of HashTable with this functions: a. Default constructor with size 100 b. The defined user constructor HashTable (int size); c. The destructor d. The hash function HF(NODE*n); e. The function AddStu(Node*n); f. The function GetInfo(char*name); which print all information[size=2]
|