Designing Address Book - Contact List, Part 1
Re-do of Westminster University J2ME assignment
As at the present time I have some spare time I decided to look over my past university assignments and see what can be improved. In this case I will back into my J2ME assignment from University of Westminster that goes some like this:
Develop and design an application for storing, retrieving and displaying personal information on the phone. This information must be able to include text, images, email addresses and telephone numbers. The application should be able to work on at least two handsets to gain full marks. The application should include two main components.
- A simple storage system for saving and retrieving personal data.
- A diary application which allows the user to plan for meetings and receive reminders. Functions must include set an appointment/meeting using time, date and comment. Receive reminders on the day of meetings.
As far I'm aware this assignment hasn't change for last 3-4 years, but there are reasons.This module is designed for 2nd year students ( and re-used for MSc degree), when they just starting with Java programming so they do not have any knowledge of language. In same time they learn Java SE and Java ME in two different modules. Therefore students are not expected to work out more complex issues.
My original solution to this can be found here, I got some 93% for that as far I can remember. It does everything as request by the assignment, but looking back I'm not exactly proud of this solution as code for multiple screens are put in single file of some 500+ lines. I wonder how I managed to find anything there, nevertheless when I submitted this I made comment of inconsistency in design between emulator and real device, and recommended to add contact list sorting method to display them in alphabetic order.
In this remake I will concentrate on first part of assignment Contact List/ Address Book, the second part Event remainder is just plain boring and not practical as the remainder will stop work as soon as the application is shut down. As the example I will use design by Sony Ericsson where when creating new Contact you have to provide name by default, or you will not be allowed to save contact, and can associate number of phones with this name. For my application I will use only four Home, Mobile, Office and Other.

Activity Diagram
I'm not big fan of UML diagrams so this is not exactly spot on, as I used NetBeans to design it I will try to explain.
Once application will start I want the user to see some Main Screen with following options:
- Add Contact - will allow the user to
- Create new contact, that has to consist of a contact name and at least one phone number. The maximum number of phone numbers associated with one contact is 4 as previously mentioned - Home, Mobile, Office and Other
- Save new contact
- Validation of contact to be saved (must have contact name and at least one phone number)
- Alert message, to let the user know the result of save operation
- View Contacts - will allow the user to
- List all stored contacts
- Delete an existing contact and show the result of delete operation in form of alert message
- Contacts will be in alphabetic order
Next section of the tutorial will look into design of the application, to maintain consistency between emulator and real device.
GUI design - Contact List, Part 2

