Question : Phonebook
Write a phonebook program that can be used to save your contact list (like what you have in your mobile phone). The program should have the following features :
•Displaying all the contact records
•Save new contact into the list
•Delete contact from the list
•Search for a particular contact
Note : The contact list should be automatically sorted according to alphabetical order of the contacts.
Sample output :
My Phonebook
------------
1. Display all records
2. Add new contact
3. Delete contact
4. Search contact
5. Exit program
Enter your choice : 1
Main Menu
Contact List
No. Name Phone
-----------------------------
1. Display all records
1. Alan Tan 012-3091141
2. Beh KS 016-2663027
3. Lim 019-3489509
4.Nicole 012-2950075
5.Thomas Lam 03-77952431
6.Thomas Wong 016-5543128
Press any key to go back to main menu
2. Add new contact
Add New Contact
---------------
Enter name : James Bond
Enter phone number : 017-7007007
Contact added successfully !
Press “A” to add another contact or press any other keys to go back to main menu
3. Delete contact
Deleting Contact
----------------
Enter contact’s name to be deleted : Fairuz
No such contact !
Press “D” to try again or press any other keys to go back to main menu
3. Delete contact
Deleting Contact
----------------
Enter contact’s name to be deleted : Nicole
Are you sure (Y/N) ? Y
Contact deleted successfully !
Press “D” to delete another contact or press any other keys to go back to main menu
4. Search contact
Searching Contact
----------------
Enter contact’s name to search : Fairuz
No such contact !
Press “S” to try again or press any other keys to go back to main menu
4. Search contact
Searching Contact
----------------
Enter contact’s name to search : James Bond
James Bond 017-7007007
1 record(s) found
Press “S” to search for another contact or press any other keys to go back to main menu
4. Search contact
Searching Contact
----------------
Enter contact’s name to search : Thomas
Thomas Lam 03-77952431
Thomas Wong 016-5543128
2 record(s) found
Press “S” to search for another contact or press any other keys to go back to main menu
All the expert, please help me, because my lecturer said this question is difficult, and nobody will do this. so, i want to proof to him that still got expert can do this question...Thanks