MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
AJEENKYA D.Y PATIL SCHOOL OF
ENGINEERING & TECHNOLOGY
( POLYTECHNIC )
AIML ENGINEERING
MICRO PROJECT
JAVA PROGRAMMING
(314317)
Academic year: 2024- 2025
CONTACT MANAGEMENT
SYSTEM
Program: Artificial Intelligence & Course : Java Programming
Machine Learning
Program code : AN Course code : 314317
MICROPROJECT
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
CERTIFICATE
This is to certify that the following students –
Roll No NAME OF STUDENT Exam Seat No
16 Saksham Chimurkar
17 Omkar Ankush
18 Samyak Chandre
19 Aditya Raut
20 Ahillya Patil
of Diploma in ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
of Institute, Ajeenkya. D. Y. Patil School of Engineering Polytechnic Institute
Code – 1649, has completed the Micro-Project satisfactorily in Subject JAVA
PROGRAMMING (314317) for the academic year 2024-2025 as prescribed in the
curriculum.
Place: Pune Date:
Subject Teacher Head of the Department Principal
INDEX
Sr. Content Page
No No.
1
Abstract
2
Introduction
3
Features
4
Code & Explanation
5
Working
6
Input & Output
7
Conclusion
8
References
ABSTRACT
A Contact Management System is an essential tool that allows users to store, organize, and
manage contact information efficiently. This microproject is developed using Java, a widely
used, object-oriented programming language known for its portability, reliability, and ease
of use. The system provides fundamental contact management operations, including adding
new contacts, viewing the saved contacts, searching for specific contacts, and deleting
contacts when needed.
This project demonstrates key programming concepts such as class and object
implementation, user input handling, data storage using ArrayLists, and basic control
structures like loops and conditional statements. Java’s ArrayList is used to store the
contacts dynamically, ensuring flexibility in managing multiple records. The program also
implements searching and deletion operations, making it a functional and interactive
application.
One of the key advantages of this system is its simple and user-friendly approach, making
it easy for beginners to understand data management and Java programming
fundamentals. This project helps strengthen logical thinking and problem-solving skills by
providing hands-on experience in handling real-world data.
Additionally, this project lays the groundwork for future improvements, such as integrating
file handling for persistent storage, graphical user interface (GUI) implementation, or
database integration for large-scale contact management applications. By the end of this
project, users will gain practical exposure to Java programming, enhancing their ability to
develop structured and efficient applications.
INTRODUCTION
A Contact Management System is a simple yet essential application that helps users store,
manage, and retrieve contact details efficiently. This microproject focuses on developing a
basic contact management system in Java, providing a structured approach to handling
contact information.
Java is a widely used programming language known for its object-oriented approach,
platform independence, and robustness. It is extensively used in software development,
making it an ideal choice for building applications like a contact manager. This project
utilizes Java’s ArrayList to store contacts dynamically, offering functionalities such as
adding, viewing, searching, and deleting contacts.
The project covers key concepts, including classes, objects, constructors, data handling,
and user input processing. It also implements basic file handling techniques to ensure
contact data is stored persistently. Through practical implementation, this microproject
enhances problem-solving skills and provides hands-on experience with Java programming.
By the end of this project, users will have a working Contact Management System,
understanding fundamental Java concepts that can be applied to more complex applications.
This project serves as a stepping stone for further learning in software development and
database management.
FEATURES
1. Add New Contacts –
a. Allows users to store contact details, including name, phone number, and email.
2. View Saved Contacts –
i. Displays all stored contacts in a well-organized format.
3. Search Contact –
a. Enables users to find a contact using name or phone number for quick access.
4. Delete Contact –
a. Provides an option to remove a contact permanently using the phone number.
5. Simple and Interactive Menu –
i. Offers a user-friendly console interface for easy navigation.
6. Dynamic Data Handling –
i. Uses ArrayList to store contacts, allowing flexible data management.
7. Error Handling –
i. Ensures proper input validation and prevents unexpected crashes.
8. Efficient Searching –
i. Uses case-insensitive search to locate contacts easily.
9. Memory Optimization –
i. Stores only essential contact details, keeping the system lightweight and
efficient.
10. Scope for Future Enhancements –
i. Can be extended with file storage, GUI, or database integration for
advanced functionality.
CODE
import [Link];
import [Link];
class Contact {
String name, phone, email;
Contact(String name, String phone, String email) {
[Link] = name;
[Link] = phone;
[Link] = email;
}
@Override
public String toString() {
return "Name: " + name + "\nPhone: " + phone + "\nEmail: " + email + "\n";
}
}
public class ContactManager {
public static void main(String[] args) {
Scanner sc = new Scanner([Link]);
ArrayList<Contact> contacts = new ArrayList<>();
int choice;
do {
[Link]("\nContact Management System");
[Link]("1. Add Contact");
[Link]("2. View Contacts");
[Link]("3. Search Contact");
[Link]("4. Delete Contact");
[Link]("5. Exit");
[Link]("Enter your choice: ");
choice = [Link]();
[Link](); // Consume newline
switch (choice) {
case 1:
[Link]("Enter Name: ");
String name = [Link]();
[Link]("Enter Phone: ");
String phone = [Link]();
[Link]("Enter Email: ");
String email = [Link]();
[Link](new Contact(name, phone, email));
[Link]("Contact Added!");
break;
case 2:
if ([Link]()) {
[Link]("No contacts found.");
} else {
for (Contact c : contacts) {
[Link](c);
}
}
break;
case 3:
[Link]("Enter Name or Phone to Search: ");
String searchKey = [Link]();
boolean found = false;
for (Contact c : contacts) {
if ([Link](searchKey) || [Link](searchKey)) {
[Link](c);
found = true;
break;
}
}
if (!found) [Link]("Contact not found.");
break;
case 4:
[Link]("Enter Phone Number to Delete: ");
String deletePhone = [Link]();
boolean removed = [Link](c -> [Link](deletePhone));
[Link](removed ? "Contact Deleted!" : "Contact Not Found.");
break;
case 5:
[Link]("Exiting...");
break;
default:
[Link]("Invalid choice! Try again.");
}
} while (choice != 5);
[Link]();
}
}
EXPLANATION
The Contact Management System in Java is built using Object-Oriented Programming
(OOP) concepts such as classes, objects, constructors, and ArrayLists. Below is a
breakdown of its key components and functionality:
1. Contact Class (Data Model)
Defines a Contact object with three attributes:
o name (stores the contact’s name)
o phone (stores the contact’s phone number)
o email (stores the contact’s email address)
The constructor initializes these attributes when a new contact is created.
The toString() method is overridden to format the contact details for display.
class Contact {
String name, phone, email;
Contact(String name, String phone, String email) {
[Link] = name;
[Link] = phone;
[Link] = email;
}
@Override
public String toString() {
return "Name: " + name + "\nPhone: " + phone + "\nEmail: " + email + "\n";
}
}
2. ContactManager Class (Main Application)
This class contains the main method and controls the program flow.
a) Declaring Scanner and ArrayList
Scanner sc = new Scanner([Link]); – Reads user input.
ArrayList<Contact> contacts = new ArrayList<>(); – Stores multiple contact objects dynamically.
b) Displaying Menu & Taking User Input
A do-while loop is used to keep the program running until the user chooses to exit.
The user selects options from the menu, and the corresponding operation is executed using a
switch-case statement.
int choice;
do {
[Link]("\nContact Management System");
[Link]("1. Add Contact");
[Link]("2. View Contacts");
[Link]("3. Search Contact");
[Link]("4. Delete Contact");
[Link]("5. Exit");
[Link]("Enter your choice: ");
choice = [Link]();
[Link](); // Consume newline
3. Functionality of Each Option
a) Adding a Contact
The user inputs name, phone, and email, which are then stored in an ArrayList as a Contact
object.
[Link]("Enter Name: ");
String name = [Link]();
[Link]("Enter Phone: ");
String phone = [Link]();
[Link]("Enter Email: ");
String email = [Link]();
[Link](new Contact(name, phone, email));
[Link]("Contact Added!");
b) Viewing All Contacts
If there are no contacts, the program displays "No contacts found."
Otherwise, it iterates through the ArrayList and prints each contact using the toString() method.
if ([Link]()) {
[Link]("No contacts found.");
} else {
for (Contact c : contacts) {
[Link](c);
}
}
c) Searching for a Contact
The user enters a name or phone number.
The program checks each contact’s name or phone number using .equalsIgnoreCase() (case-
insensitive comparison).
[Link]("Enter Name or Phone to Search: ");
String searchKey = [Link]();
boolean found = false;
for (Contact c : contacts) {
if ([Link](searchKey) || [Link](searchKey)) {
[Link](c);
found = true;
break;
}
}
if (!found) [Link]("Contact not found.");
d) Deleting a Contact
The user provides a phone number for deletion.
The program searches for a matching contact and removes it using removeIf().
[Link]("Enter Phone Number to Delete: ");
String deletePhone = [Link]();
boolean removed = [Link](c -> [Link](deletePhone));
[Link](removed ? "Contact Deleted!" : "Contact Not Found.");
e) Exiting the Program
The program terminates when the user selects option 5.
case 5:
[Link]("Exiting...");
break;
4. Error Handling and Validation
Scanner Issue Handling: [Link](); is used after [Link](); to prevent input mismatches.
Validation Check: Ensures contacts are only deleted when they exist in the list.
WORKING
The Contact Management System is a simple Java program that allows users to manage
their contacts efficiently. It performs operations like adding, viewing, searching, and
deleting contacts using an ArrayList to store contact details.
1. Start of the Program
The program begins by displaying a menu with five options.
The user is prompted to enter their choice.
Contact Management System
1. Add Contact
2. View Contacts
3. Search Contact
4. Delete Contact
5. Exit
Enter your choice:
2. Adding a Contact
If the user selects option 1, the program asks for the contact's name, phone number, and
email.
The details are stored as a Contact object in an ArrayList.
A confirmation message is displayed:
Enter Name: John Doe
Enter Phone: 9876543210
Enter Email: johndoe@[Link]
Contact Added!
3. Viewing All Contacts
If the user selects option 2, the program displays all stored contacts.
If no contacts are found, it prints:
No contacts found.
Otherwise, it lists all contacts:
Name: John Doe
Phone: 9876543210
Email: johndoe@[Link]
4. Searching for a Contact
If the user selects option 3, they can search by name or phone number.
If found, the program displays the contact details.
Enter Name or Phone to Search: John Doe
Name: John Doe
Phone: 9876543210
Email: johndoe@[Link]
If no match is found:
Contact not found.
5. Deleting a Contact
If the user selects option 4, they enter a phone number to delete.
If a contact with that phone number exists, it is removed.
Enter Phone Number to Delete: 9876543210
Contact Deleted!
If no match is found:
Contact Not Found.
6. Exiting the Program
If the user selects option 5, the program prints "Exiting..." and terminates.
Exiting...
INPUT & OUTPUT
1. Adding a Contact
2. Viewing Contacts
3. Searching for a Contact
4. Deleting a Contact
5. Exiting the Program
CONCLUSION
The Contact Management System is a simple yet useful Java project that allows users to add, view,
search, and delete contacts. It demonstrates key programming concepts such as object-oriented
programming (OOP), user input handling, and list operations using ArrayList. This project
serves as a great learning tool for beginners and can be further improved by adding data storage, a
graphical interface, or additional features for better usability.
REFERENCES
Java Documentation – Oracle Official Java Docs ([Link]
Java Programming Guide – GeeksforGeeks ([Link]
Object-Oriented Programming in Java – TutorialsPoint
([Link]
ArrayList in Java – JavaTpoint ([Link]
Scanner Class for User Input – W3Schools
([Link]
Ajeenkya. D Y Patil Educational Enterprises Charitable
Trust’sAjeenkya. D. Y. PATIL SCHOOL OF
ENGINEERING, (POLYTECHNIC)
Approved by AICTE NO. West / 1-3847411/2010/ New
Dated 13 July 2010/DTE/Affiliated to MSBTE, Mumbai.
Pune –412105 Ajeenkya. D Y Patil Knowledge City,
Charholi Bk, Via Lohegaon,
MICRO-PROJECT REPORT
Title of Micro-project : Contact Management System
- Rationale :
A Contact Management System simplifies the process of storing, searching, and
managing contact details efficiently. Java’s object-oriented approach and robust data
handling capabilities make it an ideal choice for developing such applications. This project
introduces key concepts like classes, objects, ArrayLists, and user input handling, helping
beginners build a strong foundation in Java programming.
By implementing basic CRUD operations (Create, Read, Update, Delete), learners gain
hands-on experience in developing real-world applications. This project not only enhances
logical thinking and problem-solving skills but also prepares students for more advanced
Java-based applications, making it a valuable stepping stone in software development.
- Aim/Benefits of the Micro-project
Aim:
The goal of this micro-project is to develop a Contact Management System using Java, allowing
users to store, search, view, and delete contacts efficiently. This project introduces beginners to
object-oriented programming (OOP), data handling with ArrayLists, and user input processing,
providing a hands-on approach to learning Java’s core features.
Benefits:
Strong Java Foundation: Learners gain essential skills in OOP, data structures, and user
interaction, which are transferable to advanced Java applications.
Practical Problem-Solving: Working on CRUD operations enhances logical thinking and
problem-solving abilities.
Industry-Relevant Skills: Java is widely used in software development, and understanding its
fundamentals opens up career opportunities.
Application Readiness: The project equips learners with the knowledge to develop real-world
applications and expand their programming expertise.
Boosts Confidence: By successfully implementing a working system, learners gain confidence
in coding and motivation to explore more complex projects.
- Course Outcomes Achieved :
Through this micro-project, we learn:
1. Develop Logical Thinking: Implement control structures like loops and conditionals
to manage user input and decision-making.
2. Apply Object-Oriented Concepts: Use classes and objects to create a structured
and efficient contact management system.
3. Manage Data Efficiently: Utilize ArrayLists to store, retrieve, and manipulate
contact details dynamically.
4. Enhance Problem-Solving Skills: Implement CRUD operations (Create, Read,
Update, Delete) to develop real-world applications.
5. Improve User Interaction: Design a menu-driven system that allows seamless
interaction with stored contacts.
6. Gain Practical Java Experience: Apply Java’s core features to build a functional
and interactive console-based application.
- Literature Review :
A Contact Management System is an essential tool for storing, retrieving, and managing
personal or professional contact details. Java, being a versatile and object-oriented
language, is widely used for developing such applications due to its efficiency, reliability,
and scalability.
Research highlights the importance of data structures like ArrayLists for dynamic data
storage, ensuring efficient retrieval and management of contact information. Implementing
OOP principles enhances modularity and code reusability, making the system scalable and
maintainable. This project provides hands-on experience in user input handling, CRUD
operations, and menu-driven programming, preparing learners for real-world software
development.
- Actual Methodology Followed :
The methodology for the Contact Management System project involved
a structured approach combining theory and practical implementation. The project began
with understanding core Java concepts, including object-oriented programming (OOP),
data structures, and user input handling.
A step-by-step development process was followed, starting with designing the Contact
class to store contact details, followed by implementing ArrayLists for dynamic storage. A
menu-driven approach was used to allow users to add, search, delete, and view contacts
efficiently. Special attention was given to error handling and input validation to ensure a
smooth and user-friendly experience. The project was tested for accuracy and robustness,
ensuring it met real-world requirements.
- Outputs of the Micro-Projects :
Through this Contact Management System project, we gained essential Java
programming skills, including a solid understanding of object-oriented concepts,
data handling, and user input processing. We implemented CRUD operations
(Create, Read, Update, Delete) to manage contacts efficiently using ArrayLists.
We practiced using conditional statements, loops, and functions to control program
flow and improve modularity. Additionally, we applied exception handling
techniques to manage invalid inputs and ensure a smooth user experience. These
outputs strengthened our grasp of Java fundamentals, preparing us for more
advanced application development.
- Skill Developed/Learning outcome of this Micro-Project :
Through this Contact Management System micro-project, we developed a strong
foundation in Java programming, including understanding classes, objects, and data
encapsulation. We learned to implement CRUD operations for managing contacts
efficiently using ArrayLists.
Additionally, we gained skills in control flow statements (if-else, loops), user input
handling, and exception management. The project enhanced our problem-solving
abilities, improved our understanding of object-oriented programming (OOP)
principles, and prepared us for developing more complex Java applications in the
future.
- Applications of this Micro-Project :
1. Contact Management: Store, update, search, and delete contact details efficiently.
2. Data Handling: Manage and process user information in an organized manner.
3. CRUD Operations: Implement basic Create, Read, Update, and Delete functionalities in
Java.
4. User Interaction: Develop interactive console-based applications with user input handling.
5. OOP Concepts: Apply object-oriented programming principles like encapsulation and
abstraction.
6. Future Enhancements: Expand the system with features like file storage, GUI, or database
integration.
Signature
Dhanashri Ma’am