8. Hashing - II

  • In this lab we continue implementing our own data structure library.

  • You will implement the following UML in Java:

../../_images/uml_hashing.drawio.png

8.1. Hashing - HashTableOpen

  1. Create the structure of the generic class HashTableOpen.

    • It contains five data fields.

    • Implement the constructor HashTableOpen().

    • Implement the methods int find(K key) and void rehash()

    • Implement all the function from the interface.

  2. Create the structure of the generic class HashTableOpenQuad inheriting from HashTableOpen.

    • Override the method int find(K key)

  3. Make sure that your code works.

8.2. Hahsing - HashTableOpenDouble

  1. Create the generic class HashTableOpenDouble.

  2. Implement the methods int hash2(K key), int nextPrime(int n) and boolean isPrime(int n).

  3. Override the method int find(K key).

  4. Make sure that your code works.

ENSURE WE HAVE RECORDED YOUR COMPLETION. FAILURE TO DO SO WILL RESULT IN A GRADE OF 0!