بدي مساعدة في homework data ضروري... بليييييييييييييييييز


(system) #1

Writea C++ classdeclaration for a class called HASH to implement universal hashing with chaining to students record which include {Id, Name , address, age, GPA} .
The size of the hash table n, the prime number p, the numbers a and b will be specified as a parameters to the constructor. If not specified, the following default value (n=100, P = 997, a = 23, b= 88) have to be used. Use the student ID as a key to hash the record.
The class should have at least the following member functions:
Ø insert : insert a new record to the hash table. (return true or false)
Ø retrieve : retrieve a record from the hash table for a given key (return true or false).
Ø Remove: remove a record from the hash table for a given key (return true or false).
Ø getLoadFactor: return the load factor for the table.
Ø Constructors and a destructor.
Ø Include the main function to test your class.
HINTS: Include any necessary data members and any other function you may need… بللييييييز قبل الخميس(هدا الخميس)