Coders Packet

Phone Book in JAVA

By Sonali Mahadev Sankpal

This Phone Book consist various operations on Contact list . 1)Display List 2)Insert contact 3)Delete contact 4)Delete same contact 5)Update contact 6)Search

Steps :-

1] In main class first accept method is called.After taking contact with name and number .We sort the contact list by Name.

2]Ask user to enter their choise to perform operation 

          i)Display Contact List

         ii)Insert Contact

        iii)Update existing contact

        iv)Delete contact

         v)Delete same name in phonebook

        vi)Delete same number in phonebook

       vii)Search contact

This operation can be chosen using switch case.

3]Display method

        Using linked list all contacts are displayed.

4]Insert Method

         First we will take name from user and then number . After taking number we check whether the number is in correct format or not.

then we insert the contact in contact list using linked list.

5]Update Method 

         In this method we ask user whether they want to change name or number. After taking choise of user we select respective operation using switch case 

  i) When user want to change name -> 

         take new name from user and update it.

  ii)When user want to change number -> 

         take new number from user and update it.

6]Delete contact method

     we delete contact from contact list using linked list.

7] Delete the same name from Phonebook

      First, we traverse the linked list and then we delete the duplicate name.

8] Delete same number from Phonebook

      First we traverse the linked list and then we delete the duplicate number.

9]Search Contact in Phonebook

      we search contact using bubble sort algoritham. 

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Sonali Mahadev Sankpal (SonaliSankpal)

Download packets of source code on Coders Packet