in code fragments we show classhashtablemapwhich implements the map adt using hash table with linear probing to resolve collisions these code fragments include the entire implementation of the map adtexcept for the methods values(and entries()which we leave as an exercise ( - the main design elements of the java class hashtablemap are as followswe maintainin instance variablesthe sizenof the mapthe bucket arrayaand the capacitynof we use method hash value to compute the hash function of key by means of the built-in hashcode method and the multiply-add-and-divide (madcompression function we define sentinelavailableas marker for deactivated entries we provide an optional constructor that allows us to specify the initial capac ity of the bucket array if the current bucket array is full and one tries to insert new entrywe rehash the entire contents into new array that is twice the size as the old version the following (protectedauxiliary methods are usedcheckkey( )which checks if the key is valid this method currently just checks that is not nullbut class that extends hashtablemap can override this method with more elaborate test rehash()which computes new mad hash function with random pa rameters and rehashes the entries into new array with double capacity findentry( )which looks for an entry with key equal to kstarting at the index [ ( )and going through the array in circular fashion if the method finds cell with such an entrythen it returns the index of this cell otherwiseit returns - - where is the index of the last empty or available cell encountered code fragment class hashtablemap implementing the map adt using hash table with linear probing (continues in code fragment