CPSC 215 Lab 11, 12/2/99 Multi-Key Hashing For this lab you are to implement a hash table containing records of students, which include their names and phone extensions: class student { String name; // name of student int ssn; // social security number int ext; // phone extension String year; // e.g, "junior", "senior"... String Address = "some tiny dorm room"; String hobbies = "party all night, go to class late"; student nextStudent; // this effectively implements a linked list. // if null (default), then no more records student(String n, int s, String y) { name = n; ssn = s; year = y;} // other info entered later void printrecord() {} //you define it } // end class student The hash table should be searchable by giving the name, the SSN, or BOTH. That is, you need two hash functions: h1: hash the name by taking the adjusted ascii value of the second letter of the name string: int h1(String name) { return ( (int) name.charAt(1) ) - 65; } h2: hash the social security number by taking the last two digits int h2(int ssn) { return (ssn % 100); } // make this % 50 if memory low Then you need to creat, for the table, a 2D array of linked lists. Each list represents all the student records whose names and SSNs yield the same hash values. For example, if student "Gary" has SSN 876213422 and student "Mary" has SSN 399515622, then both student records are to be found in the list of students stored at array coordinate [32][22], because h1("Gary") == h1("Mary") == 32, and h2(876213422) == h2(399515622) == 22. The dimensions of your array should be 100 by 60, due to the nature of the hash functions. Your program should create several sample student records, INCLUDING records that will yield the same hash values. You need to demonstrate that your program can search for a record by the name, the SSN, and by using both. Define a printrecord method inside class student so you can demonstrate that your program works correctly. Basically, your program should have at minimum the following methods: void insert(student s) // inserts new student record into table Student lookup(String name) // looks up the (first) record of a student // of that name Student lookup(int ssn) // looks up record of student who has ssn // as his/her SSN number. Student lookup(String name, int ssn) // lookup using both keys // These record should report "no such student" if the record can't be found. /* Since I'm a REALLY NICE professor, I won't make you do deletion this time */