The Contact Book Application is a Java-based program that allows users to manage their contacts. With this application, you can:
- Add new contacts with name, phone number, and email.
- Delete existing contacts by name.
- Search for a contact by name to view their details.
The application uses Java Collections (HashMap
) to store and manage contacts efficiently.
- Add a new contact: Save contact details such as name, phone number, and email.
- Delete a contact: Remove a contact from the contact book by name.
- Search for a contact: Find and display contact details by searching for a name.
- Display for contact: Displays the information from the stored contact.
- Data stored in memory: Contacts are stored in a
HashMap
and persist for the duration of the program session.
- Language: Java
- Collections: HashMap
- Java JDK 8 or higher: Ensure that you have Java installed on your machine. You can download it from here.
- Clone this repository:
git clone https://github.com/your-username/Contact-Book-Application.git
- Navigate to the project directory:
cd contact-book-app
- Compile the Java files:
javac Contact.java ContactBook.java Main.java
- Run the application:
java Main
The program will start and prompt you to interact with the contact book. You can add, delete, and search for contacts using the options provided.
- Run the application using the
java Main
command. - You will be presented with a menu to choose an action:
- 1: Add a new contact
- 2: Delete a contact by name
- 3: Search for a contact by name
- 4: Display contact
- 5: Exit the program
- Follow the on-screen instructions to add, delete, or search for contacts.