Address Book in JAVA

18
Address Book in JAVA By -Ashtosh Jha -Gaurav Asati -Prabhakar Sharma

description

presentation made for our college pproject

Transcript of Address Book in JAVA

Page 1: Address Book in JAVA

Address Book in JAVA

By-Ashtosh Jha-Gaurav Asati-Prabhakar Sharma

Page 2: Address Book in JAVA

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, address, phone no. etc

• The operations like adding, sorting, searching, deleting etc is done on the entries

Page 3: Address Book in JAVA

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

Page 4: Address Book in JAVA

• 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

Page 5: Address Book in JAVA

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

Page 6: Address Book in JAVA

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

Page 7: Address Book in JAVA

Address Book-The Project

• There are 3 classes-AddressBook-OperationHandler-Contact

Page 8: Address Book in JAVA

AddressBook

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

Page 9: Address Book in JAVA

AddressBook Methods

• Constructor -Create frame for AddressBook

-Set position of frame• Add widgets -Add buttons to panels -Options & Help to upper panel -Add, Delete ,Search ,Sort ,View all to lower

panel

Page 10: Address Book in JAVA

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

Page 11: Address Book in JAVA

Contacts

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

-birthday.

Page 12: Address Book in JAVA

Contacts Methods

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

Page 13: Address Book in JAVA

Operation Handler

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

Page 14: Address Book in JAVA

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

Page 15: Address Book in JAVA

• Sort contacts-Create frame for Sort buttons.-Ask for order of search.- Modify contacts in sorted order.

• Delete contacts-Create frame for Delete buttons.-Delete selected contacts one by one.-Modify list after deletion.

Page 16: Address Book in JAVA

• View All Contacts-Create frame for View All button.-Show all contacts in list.

• Action performed- Check for normal Execution-Report if any problem

Page 17: Address Book in JAVA

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.

Page 18: Address Book in JAVA