PhoneDirectory is a Java application that simulates a phone directory, allowing users to store and manage contact information. It utilizes various data structures to efficiently store and retrieve data, including HashMap, Binary Search Tree (BST), and LinkedList.
- Add a new contact with name and phone number.
- Search for a contact by name or phone number.
- Update contact details such as name or phone number.
- Delete a contact from the directory.
- Display all contacts in alphabetical order or by phone number.
- Import and export contacts to/from a file for data persistence.
The PhoneDirectory application utilizes the following data structures:
- HashMap: Used for fast lookup of contacts by name, ensuring constant-time complexity for retrieval and storage.
- Binary Search Tree (BST): Used to maintain contacts in sorted order by phone number, enabling efficient searching and retrieval operations.
- LinkedList: Used for storing contacts in the order they were added, facilitating insertion and deletion of contacts.
To run the PhoneDirectory application on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/SajidBhatti786/PhoneDirectory.git
-
Open the project in your preferred Java IDE.
-
Build and run the application.
- Add a Contact: Use the "Add" functionality to enter the name and phone number of a new contact.
- Search for a Contact: Use the "Search" functionality to find a contact by name or phone number.
- Update a Contact: Use the "Update" functionality to modify the name or phone number of an existing contact.
- Delete a Contact: Use the "Delete" functionality to remove a contact from the directory.
- Display Contacts: Use the "Display" functionality to show all contacts in alphabetical order or by phone number.
- Import/Export Contacts: Use the "Import" and "Export" options to load contacts from a file or save contacts to a file for data persistence.
Contributions to the PhoneDirectory project are welcome. If you have any suggestions, improvements, or bug fixes, please submit a pull request or open an issue in the GitHub repository.
- PhoneDirectory
- Java application
- Phone directory
- Contact management
- Contact information
- HashMap
- Binary Search Tree (BST)
- LinkedList
- Add contact
- Search contact
- Update contact
- Delete contact
- Display contacts
- Import contacts
- Export contacts
- Data structures
- Data persistence
- Sorting contacts
- Name lookup
- Phone number lookup
- Fast retrieval
- Constant-time complexity
- Insertion and deletion
- Alphabetical order
- File management
- Getting started
- Local development
- Clone repository
- IDE
- Build and run
- Usage
- Functionality
- Contact details
- Data storage
- Data retrieval
- Data modification
- Display options
- File import
- File export
- Contributing
- Pull requests
- Issue tracking
- License
- MIT License
- Open source project
- Customization
- Bug fixes
- Suggestions
- Improvements
- Data management
- File handling
- Data lookup
- Sorting algorithms
- Collaboration
- Contact organization