Programming in Java - Homework 6
Instructor: Alok Mehta
CSCI 2220-01 Fall 2002
Due: December 6, 2003
Address Book
Create a Swing application that implements an Address Book.
1. A model for your address book (25%)
Define a Person class that has fields for storing a Person's name,
address, and phone number. Have this class implement 'Serializable'.
Use an appropriate Collection class for maintaining a collection of
people (this will be the "model" for your address book).
Create a main program that "seeds" your address book with some
data. The application should programmatically create several
instances of Person objects, add them to your collections class and
serialize (save) the collection of Person objects to a file. The file
that is saved is your "address book".
2. Viewing your address book (30%)
Create a GUI that allows you to view an address book.
- The user should be able to specify the name of the file
(address book). This can initially be specified at the command
line when starting the program. You may also want to look into
JFileChooser.showOpenDialog().
- There should be two types of components for displaying your
address book. The first type should show a list of all
of the people in your address book. This could contain
summary information only (for example, just the person's
name).
- The second type of GUI component should show the details
for a single person.
3. Managing your address book (30%)
Add in functionality to manage your address book (create new person objects,
edit the fields of a person object, delete person objects, and save
your address book). For saving an address book to a file, you may
want to look into JFileChooser.showSaveDialog().
4. Programming Style and User Interface Design (15%)
The above section grading percentages are based on functionality
(is the functionality implemented and does it work correctly).
Because of the free form nature of the assignment, a significant
weight is added to your programming style and the organization of
your code, as well as to the design of your user interface
(how intuitive is your application to use).