Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Write a JAVA program that will maintain a phone directory using a Vector. The program should be able to perform the following operations: 1)Add persons

image text in transcribed

Write a JAVA program that will maintain a phone directory using a Vector. The program should be able to perform the following operations: 1)Add persons details (first name, last name, phone number, city, address, sex and email) to the phone directory, where phone numbers in the directory have to be unique. (Note: each person record will store in one node in the Vector and insert each person to the last) 2)Delete any person details by a given phone number. 3)Update telephone number by providing person first name. 4)Display all details of persons from a phone directory. 5)Search telephone number based on person first name. (Note: use sequential search to find all telephones for the given first name) 6)Sort all persons in the phone directory ascending based on person first name. (Note: use sorting algorithm from your study to arrange the entire phone directory)

Project Outputs:

show the screen of the output has to display a menu of choices. Then the user can select which operation want to perform. Also, you can use the method System.exit(0); to exit the program. The menu of choices will be: 1)Add person details into the telephone book. 2)Remove a person from the telephone book. 3)Update a telephone number by providing person first name. 4)Display the entire telephone book. 5)Search a telephone number based on person first name. 6)Sort the entire telephone book. 7)Exit the program.

The features of telephone book system are mainly related to adding, listing, searching, sorting, modifying and deleting telephone directory-related records. All these operations are done through using Vectors. The information contained in the telephone directory records are the first name, last name, phone number, city, address, sex and email of the person whose record is entered in the telephone directory system. Project Operations Write a JAVA program that will maintain a phone directory using a Vector. The program should be able to perform the following operations: 1) Add persons details (first name, last name, phone number, city, address, sex and email) to the phone directory, where phone numbers in the directory have to be unique. (Note: each person record will store in one node in the Vector and insert each person to the last) 2) Delete any person details by a given phone number. 3) Update telephone number by providing person first name. 4) Display all details of persons from a phone directory. 5) Search telephone number based on person first name. (Note: use sequential search to find all telephones for the given first name) 6) Sort all persons in the phone directory ascending based on person first name. (Note: use sorting algorithm from your study to arrange the entire phone directory) Project Outputs The output has to display a menu of choices. Then the user can select which operation want to perform. Also, you can use the method System.exit(0); to exit the program. The menu of choices will be: 1) Add person details into the telephone book. 2) Remove a person from the telephone book. 3) Update a telephone number by providing person first name. 4) Display the entire telephone book. 5) Search a telephone number based on person first name. 6) Sort the entire telephone book. 7) Exit the program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions