import java.io.*; import java.lang.*; abstract public class AbstractHashTable { // Methods already exist in Part A // In your implementation, the constructor must take an int argument // as table size/capacity. If the argument is negative or not a prime, // set the table size to be the smallest prime larger than requested // size. Unlike class Hashtable in JDK, the hash table in this // programming assignment is not expandable. // Returns the size/capacity of hash table. abstract public int getSize (); // For grading purpose, the public variable probeCount is incrememted // by 1 whenever a probe was made, useful or useless, as // put/containsKey/remove routines are called. public int probeCount; // Returns true if the input i is a prime; otherwise return false. public static boolean isPrime (int i) { if (i <= 1) return false; for (int j = (int)Math.sqrt((double)i); j>1; j--) if (i%j == 0) return false; return true; } // Returns the hash value of the given key. // See Horner's rule and MAD method in lecture slides. public int hashValue (String key) { int hashVal = 0; for (int i=0; i