Question
In Java please . I have asked for help so many times and none of the answers are correct. Write a program that provides a
In Java please. I have asked for help so many times and none of the answers are correct. Write a program that provides a way for you to store and retrieve telephone numbers. It has four classes Person Class, PhoneBook class, Menu Class and HashTable class. Design a console program that provides the following operations:
Person, which represents the name and phone number of a person, you will store instances of this class in the phone book.
PhoneBook, which represents the phone book. The class should contain a hash table as a data field. This table contains the people in the book. The phone book should contain the add, delete, find, change, quit, save and restore methods.
Menu, which provides the programs user interfacecontains a main() method which creates a PhoneBook object, displays the PhoneBooks methods as different menu selections and invokes the PhoneBook method the user selects.
HashTable, which is the ADT HashTable. This is the class which contains the PhoneBooks collection of data (all of the People objects in the PhoneBook), as well as the operations which can be performed on that collection of data.
The key to this project is in the implementation of a hashCode() method, which translates a key value into a numeric index value, which identifies the location in which an item will be stored in the hash table.
You must also consider how to resolve a collision. This is when two key values are translated into the same index value.
The program should read data from a text file when it begins and save data into the text file when the user quits the program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started