0% found this document useful (0 votes)
2 views

java.Microproject_repaired

The document is a micro project report for a 'Contact Book' application developed as part of a Java Programming course at Matoshri Aasarabai Polytechnic. It outlines the project's aim to design a JAVA application for managing contact information, detailing features such as adding, editing, searching, and deleting contacts. The report includes acknowledgments, a brief introduction, and a conclusion stating the successful development of the application, which facilitates efficient contact management.

Uploaded by

shrutiaware545
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

java.Microproject_repaired

The document is a micro project report for a 'Contact Book' application developed as part of a Java Programming course at Matoshri Aasarabai Polytechnic. It outlines the project's aim to design a JAVA application for managing contact information, detailing features such as adding, editing, searching, and deleting contacts. The report includes acknowledgments, a brief introduction, and a conclusion stating the successful development of the application, which facilitates efficient contact management.

Uploaded by

shrutiaware545
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

A

Micro Project Report


on
CONTACT BOOK
Under Course: JAVA PROGRAMMING (314306)

SEMESTER: IV

Matoshri Aasarabai Polytechnic, Eklahare, Nashik

Academic Year: 2024-25


CERTIFICATE
This is to certify that following students of FOURTH
SEMESTER Diploma Engineering Program in Computer
Department have successfully completed the Micro-Project
“CONTACT BOOK.” Under My Supervision, in the partial
fulfillment of Course JAVA PROGRAMMING (314306) for
Academic Year 2024-2025 as per prescribed in the MSBTE “K-
Scheme” curriculum.

Sr. Roll Enrollment No. Name of Candidates


No. No.
1. 57 23611810268 Snehal Anil Tarle
2. 52 23611810260 Rutuja Vilas Shelar
3. 50 23611810258 Mansi Madhukar Sangamnere

Date: Place: Nashik

Subject Teacher Head of Department Principal

Ms.N.V.Keskar Mr.V. A. Sonawane Dr.A.S.RELKAR


Programme: Computer Engineering Semester:-Fourth

Course:- Java Programming Course Code :314306

Tittle of Micro Project: CONTACT BOOK

SR_NO. CONTENT PAGE NO.

Part A

1.0 Brief Introduction

2.0 Aim of Micro Project

3.0 Action Plan

4.0 Resources Required


ACKNOWLEDGEMENT

With deep sense of gratitude we would like to thanks


all the people who have lit our path with their kind
guidance. We are very grateful to these intellectuals
who did their best to help during our project work. It
is our proud privilege to express deep sense of
gratitude to, Dr.A.S.RELKAR Principal of Matoshri
Aasarabai Polytechnic, Eklahare, Nashik, for his
comments and kind permission to complete this
Micro Project. We remain indebted to Prof.
Mr.V.A.SONAWANE, Head of Computer
engineering department for his suggestion and
valuable guidance. The special gratitude goes to our
internal guide Ms.N.V.KESKAR, technical staff
members, and
Programme: Computer Engineering Semester: fourth

Name of faculty: Ms.N.V.Keskar CourseCode:314306

Tittle of Micro Project: CONTACT BOOK

Sr. Roll Enrollment No. Name of Candidates Sign


No. No.
1. 57 23611810268 Snehal Anil Tarle
2. 52 23611810260 Rutuja Vilas Shelar
3. 50 23611810258 Mansi Madhukar Sangamnere
INTRODUCTION

A Contact Book is e-address book.


It is a JAVA Application which enables users to centralize
and save their contact information at one place.
It gives an easy way to gather and organize information
about your personal or business address or phones.
We can use it as a business directory,customer database,or
personal contact address/phone book.
Using this application we can easily update our contact
information,delete unwanted contact,insert new
contact,search from the existing contacts.
It’s easy to keep a track all the contact information using a
simple and smart application CONTACT BOOK.
Aim of Micro project:
To design and implement a Contact Book application in java that
allows user to store,view,search,and manage contact information.

Features of Contact book:


1.Adding Contact:
The application should allows user to input new contact information.

2.Editing Contact:
User should be able to modify existing contact details.

3.Searching Contacts:
The application should provide a way to find specific contacts by
Name,number,or other criteria.

4.Displaying Contact:
Users should be able to view a list of all stored contacts or search
Results.

5.Deleting Contacts:
The application should allow users to remove contact.

6.Data Storage:
the contact information can be stored in a database or a simple file
system.
CODE :

import java.awt.*;
import java.awt.event.*;
import java.util.ArrayList;

public class ContactBookAWT


{
private Frame mainFrame;
private Panel inputPanel, buttonPanel, displayPanel;
private Label nameLabel, phoneLabel, emailLabel;
private TextField nameText, phoneText, emailText;
private Button addButton, viewButton, deleteButton, clearButton;
private TextArea contactArea;
private ArrayList<String> contacts = new ArrayList<>();

public ContactBookAWT() {
prepareGUI();
}
private void prepareGUI() {
mainFrame = new Frame("Contact Book");
mainFrame.setSize(600, 500);
mainFrame.setLayout(new BorderLayout(10, 10)); mainFrame.addWindowListener(new
WindowAdapter() {
public void windowClosing(WindowEvent windowEvent) {
System.exit(0);
}
});
inputPanel = new Panel();
inputPanel.setLayout(new GridLayout(3, 2, 5, 5));
inputPanel.setPreferredSize(new Dimension(550, 100));

nameLabel = new Label("Name:");


phoneLabel = new Label("Phone:");
emailLabel = new Label("Email:");

nameText = new TextField(20);


phoneText = new TextField(20);
emailText = new TextField(20);

inputPanel.add(nameLabel);
inputPanel.add(nameText);
inputPanel.add(phoneLabel);
inputPanel.add(phoneText);
inputPanel.add(emailLabel);
inputPanel.add(emailText);

buttonPanel = new Panel();


buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));
addButton = new Button("Add Contact");
viewButton = new Button("View Contacts");
deleteButton = new Button("Delete Contact");
clearButton = new Button("Clear");

addButton.setPreferredSize(new Dimension(120, 30));


viewButton.setPreferredSize(new Dimension(120, 30));
deleteButton.setPreferredSize(new Dimension(120, 30));
clearButton.setPreferredSize(new Dimension(120, 30));

buttonPanel.add(addButton);
buttonPanel.add(viewButton);
buttonPanel.add(deleteButton);
buttonPanel.add(clearButton);

displayPanel = new Panel();


displayPanel.setLayout(new BorderLayout());
contactArea = new TextArea(10, 50);
contactArea.setEditable(false);
displayPanel.add(new Label("Contact List:"), BorderLayout.NORTH);
displayPanel.add(contactArea, BorderLayout.CENTER);

mainFrame.add(inputPanel, BorderLayout.NORTH);
mainFrame.add(buttonPanel, BorderLayout.CENTER);
mainFrame.add(displayPanel, BorderLayout.SOUTH);

addButton.addActionListener(e -> addContact());


viewButton.addActionListener(e -> viewContacts());
deleteButton.addActionListener(e -> deleteContact());
clearButton.addActionListener(e -> clearFields());

mainFrame.setVisible(true);
}

private void addContact() {


String name = nameText.getText();
String phone = phoneText.getText();
String email = emailText.getText();

if (!name.isEmpty() && !phone.isEmpty() && !email.isEmpty())


{
contacts.add("Name: " + name + ", Phone: " + phone + ", Email: " + email);
contactArea.setText("Contact Added Successfully!\n");
clearFields();
}
else {
contactArea.setText("Please fill all fields!\n");
}
}
private void viewContacts() {
if (contacts.isEmpty()) {
contactArea.setText("No contacts available!\n");
} else {
StringBuilder allContacts = new StringBuilder();
for (String contact : contacts) {
allContacts.append(contact).append("\n");
}
contactArea.setText(allContacts.toString());
}
}

private void deleteContact() {


String name = nameText.getText();
boolean found = false;

if (!name.isEmpty()) {
for (int i = 0; i < contacts.size(); i++) {
if (contacts.get(i).contains("Name: " + name)) {
contacts.remove(i);
found = true;
break;
}
}
if (found) {
contactArea.setText("Contact Deleted Successfully!\n");
} else {
contactArea.setText("Contact Not Found!\n");
}
clearFields();
} else {
contactArea.setText("Enter a name to delete!\n");
}
}

private void clearFields() {


nameText.setText("");
phoneText.setText("");
emailText.setText("");
contactArea.setText("");
}

public static void main(String[] args) {


new ContactBookAWT();
}
}
Output:
CONCLUSION:
The Contact Book Management System project has been
successfully developed using java.It fulfills the primary
objective of managing contact efficiently through basic
Create,Read,Update,Delete operations.The application allows
user to store and manage information such as
names,phone,number emails and addresses using a console-base
interface.

You might also like