You are on page 1of 18

Address Book in JAVA

By
-Ashtosh Jha
-Gaurav Asati
-Prabhakar Sharma

What is Address Book • Address Book is book or database used for storing entries called contacts • Each contact entry usually consists of a few standard fields for eg name. sorting. deleting etc is done on the entries . address. phone no. searching. etc • The operations like adding.

Why Address Book • A software Address Book is easier to use than a paper Address Book a variety of operations can be performed easily on it. • Address Book is thing which is useful to all users as being social entities from a child to an old man all have contacts and it provides an easy tool to manage contacts .

• Java provides platform independency so use of java in this project has increased its dimensions • This Address Book is for online and offline both users .

JAVA • It was developed by James Gosling at Sun Microsystems and was released in 1995 • Architectural neutral and portable • Robust and secure • Interpreted and threaded .

JVM • A Java Virtual Machine (JVM) is a set of computer software programs and data structures that use a virtual machine model for the execution of other computer programs • Bytecode is the jvm’s version of machine code • Jvm not only runs java generated bytecode • Jvm provides ‘write once run anywhere’ to java programs .

Address Book-The Project • There are 3 classes -AddressBook -OperationHandler -Contact .

• Make frame. AddressBook • Implements ActionListener. • Add panel. . • Add menu. • Create reference of OperationHandler.

Sort .Search . Delete .View all to lower panel . AddressBook Methods • Constructor -Create frame for AddressBook -Set position of frame • Add widgets -Add buttons to panels -Options & Help to upper panel -Add.

-Join each button to corresponding action. • Action Performed -Ladder of IF-ELSEIF -Catch correct action -Call Operation Handler methods .

• Create variables to store values.e-mail. . nick name . last name. phone number . Contacts • Implements Serializable. -first name. address -birthday.

All these methods are public .All variables of type string -Set the values for all variables . . Contacts Methods • Defines Setter & Getter methods.

• Main Class: All operations defined . • Create Threads for each button. • Create frame for each button. Operation Handler • Implements Action Listener . .Runnable. • Serialize & Deserialize Contact Class.

Operation Handler Methods • Add new -Create frame for button Add new -Put labels on panels -Accept text entered • Search contacts -Create frame for button Search -Display type of search accepted -Show results of search .

Modify contacts in sorted order. -Ask for order of search. . -Delete selected contacts one by one. .• Sort contacts -Create frame for Sort buttons. -Modify list after deletion. • Delete contacts -Create frame for Delete buttons.

-Show all contacts in list.• View All Contacts -Create frame for View All button.Check for normal Execution -Report if any problem . • Action performed .

Future Implementations • The project is general purpose now It can be specialized such as for a doctor patient details for a manager employee details etc by expanding respective fields. • It can be made online also • The image options fields can also be added. .