Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use input/output files and also use exceptions will manage an individual's address book. The program should allow a user to add new contacts, print

please use input/output files and also use exceptions image text in transcribed
will manage an individual's address book. The program should allow a user to add new contacts, print the entire address book, search for a contact, modify the information about a specific contact, delete a contact, and exit the program. These features should work as follows: . Display the menu to the user that contains all the above . Get input from the user. Note: Remember to perform input . Add new contact - For this option, get the name, address, options. Use a function for this option. (5 points) validation (5 points) phone number, and email address from the user. Write/Adod them to a file contacts.txt. Note: Make sure to use exception handling when opening the file for read/write purposes. Write out the file such that all the information about an individual is on separate lines. For example, the name "Mickey" and address "Disney Land" should be on separate lines rather than on the same line. (10 points) Print the Address Book - For this option, print all the contents of the address book. (5 points) . Search for a contact - For this option, ask the user for the name of the contact who they are looking for. Based on the name, look for that individual in the file one line at a time and, if they are found, display all the information for that individual. If the individual is not found, then display a message to the user saying "There is no contact with that name in your address book." (10 points) . Delete a contact For this option, ask the user for the name of the contact who they want to delete from the addressbook. The first step is to find that individual in the file. If the individual exists in that file, then create a new file, copy all the contents before that individual and after that individual into that new file. Then write the entire to a 'new file called contacts.txt. (10o points) . Exit - For this option, ask the user if they want to continue (y). If they would like to continue, then display the menu and get input from the user. If not, exit the program. Note Make sure to include input validation for y. (5 points)

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_2

Step: 3

blur-text-image_3

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 Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions