Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

Discuss the importance of logistics in effective communication.

Answered: 1 week ago

Question

What are the six steps in applying for a patent?

Answered: 1 week ago