Write a java program that is able to apply a hash function to a first and last name (key) of a person, and lookup the appropriate index in a hash table modeling a telephone directory.

computer science

Description

Write a java program that is able to apply a hash function to a first and last name (key) of a person, and lookup the appropriate index in a hash table modeling a telephone directory. The telephone number (value) should be returned on doing a lookup (you can prepopulate the table with 20 entries for this purpose). You can use existing Java code (or libraries) to model the hash table, however, your program should be customized to use the hash table structure appropriately. Demonstrate that your program works by providing meaningful console messages that walk the tester through the search function in the directory. Call your primary tester file HashTableImplementation.java Implement the same telephone directory search problem in 1. using a Binary Search Tree. Implement the program and walk the tester through it using meaningful and intuitive console messages. Demonstrate that your program works by providing meaningful console messages that walk the tester through the search function in the directory. You can use existing Java code (or libraries) to model the BST, however, your program should be customized to use the BST structure appropriately. Call your primary tester file BSTImplementation.java


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.