Question: The programming language is Java. Write a program that provides a way to store and retrieve telephone numbers. Design a user interface that provides the

The programming language is Java.

Write a program that provides a way to store and retrieve telephone numbers. Design a user interface that provides the following operations:

Add: Adds a persons name and phone number to the phone book

Delete: Deletes a given persons name and phone number from the phone book, given only the name

Find: Locates a persons phone number, given only the persons name

Change: Changes a persons phone number, given the persons name and new phone number

Quit: Quits the application, after first saving the phone book in a text file

You can proceed as follows:

Design and implement the class Person, which represents the name and phone number of a person. You will store instances of this class in the phone book.

Design and implement the class PhoneBook, Which represents the phone book. The class should contain a binary search tree as a data field. The tree contains the people in the book

Add method that uses a text file to save and restore the tree

Design and implement the class Menu, which provides the programs user interface

The program should read data from a text file when it begins and saves data into a text file when the user quits the program.

Note:

Please use phoneBook.txt as the input file name.

The input file will have the following format: One person per line, with name and phone number, separated by a TAB.

Example:

John Smith 2523217788

William Jones 9198884321

Smith Johnson 2523281010

An only text-based user interface (not graphical user interface) is needed.

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!