Question: Design and implement a user interface class, Book.java , that provides the operations described below. The goal of this assignment is to create a user
Design and implement a user interface class,Book.java, that provides the operations described below.
The goal of this assignment is to create 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 saving the phone book in a text file (newPhoneBook.txt)
You can procced as follows:
-Design and implement the classPerson.java, 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 classBook.java, which represents the phone book. The class should
contain a binary search tree as a data member. This tree contains the people in the phone book.
-Add member functions that use a text file to save and restore the tree.
Program Input When it begins, the program gets its input from a text file,phonebook.txt. Here is a sample input file:
Ryan Gosling 569-534-5454
Meg Ryan 443-438-4934
Jed Amarn 343-554-3232
OutPut
The program saves data into a text file,newPhoneBook.txt, when the user quits the program. Here is the output for the sample input file given above:
Jed Amarn 343-554-3232
Ryan Gosling 569-534-5454
Meg Ryan 443-438-4934
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
