Question: CMPT 270, Assignment 2, Due, May 26, 2017. Hash Table using Linked Lists In this assignment I want you to implement a hash table structure

 CMPT 270, Assignment 2, Due, May 26, 2017. Hash Table usingLinked Lists In this assignment I want you to implement a hash

CMPT 270, Assignment 2, Due, May 26, 2017. Hash Table using Linked Lists In this assignment I want you to implement a hash table structure using the linked list you developed for assignment #1 A hash table is a complex object build on top of another object, in this case a linked list. Here is the UML for the hash table: HashTable key List Array Array +hashToKeylin info: String) int +insertInfo(in infoToStore String) +findlinfo(in infoToFind String) LList +deletelnfo(in infoToRemove String) LList info: String nextl L String mpty bool +insertAtHead(in info) LList +nextList():LList +ISize():int eletelnfol traverse String The hash table contains an array of linked lists. Each linked list is a folded set of info to be stored in the hash table where a info elements in the list will have the same key value. The array is set to 15 elements in capacity. (NOTE: Both Array and String are Java classes -you do not have to implement these Here are the story specs for each behavior Story 1: hashTokey(in info String):int The input argument is the string of text to be hashed. The function returns an integer value in the range 0..14 by converting the two first characters ofthe info string into integers, adding them together and then computing the modulo 15. For example, suppose we have "Canada" as the info string. The key will be computed from 'C' and'a' which are ASCII 67 and 97 respectively. 67+97 164, 164 mod 15 14 so the info string "Canada" will be inserted into the LList in index 14 of the array. (HINT: the following statements give the numeric int equivalent of the 'C' in "Canada": String s2 new String("Canada"); creates a String object char achar ss2.toCharArray() oj; String object creates an array of char with C in pos 0; System.out.println nt) achar); output the int cast of the 'C' which is 67

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!