Question: Write a program that provides a way for you to store and retrieve telephone numbers. It has three classes Person Class, PhoneBook class, and Menu

Write a program that provides a way for you to store and retrieve telephone numbers. It has three classes Person Class, PhoneBook class, and Menu Class. Design a console program that provides the following operations:

Add: Adds a person’s name and phone number to the phone book.

Delete : Deletes a given person’s name and phone number from the phone book, given only the name.

Find: Locates a person’s phone number, given only the person’s name.

Change : Changes a person’s phone number, given the person’s 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. This tree contains the people in the book.

-Add methods that use a text file to save and restore the tree.

- Design and implement the class Menu , which provides the program’s user interface.

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

3.51 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This question involves designing and implementing a small consolebased application in an objectoriented programming language like Python Java or C The solution requires creating three main classes Per... View full answer

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 Programming Questions!