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

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

And neither will we. I did this for my class 35 years ago, I don't need to do it for your class. But if you attempt it and post your problems, we will attempt to help you. But you already know this, because you did read the post above titled Read Me: Read This Before Posting, right? :icon_twisted:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.