Introduction to Computer Science II by James Tam | Return to the course web page |
The full program will read the information about the contacts from a text file called "contacts" and display this information in a list. The user will have the ability to add a new contact or delete an existing contact. When the user wants to quit the program by closing the window the updated contact list will be saved in a file called "updatedContacts".
Base grade levels |
|
D- |
Student has invested considerable effort in the assignment but the code won't compile. |
D |
Student has invested considerable effort in the assignment. The program compiles but does not fulfill any of the requirements listed below. |
D+ |
Program is an "empty" GUI. While you do not have to use one of the layout manager classes for this assignment, all the components are laid out neatly but none of the functionality has been implemented e.g., pressing a button does nothing. |
C- |
The window can be closed by pressing the close window control. |
C |
Program reads the initial information for the list of contacts from a file called "contacts". (You must use this file name otherwise your TA will have a hard time figuring out what name that you used making the marking that much harder). The list of contacts will be displayed in the list. Your program will automatically load in the list of contacts from file, there is no need to implement another control (such as a "load" button) to do this. |
C+ |
As the window closes (as per the functionality implemented in the "C-" level assignment) the program will write the current contents of the list to a file which must be called "updatedContacts"). |
|
|
Additional features:Implementing each of the features listed below will result in a grade increase of one letter "step" for each feature implemented for a maximum grade of A+. Except for case #2, 5 & 6 you are free to implement the features in whatever order that you desire. |
|
1 |
The user can remove contacts from the list by selecting it from the list and pressing the remove button. |
2 |
When the list is empty, the remove button is disabled. You must have implemented feature #1 prior to implementing this feature (so you can empty out the list). |
3 |
Text that is entered into the text field will be added to the list as a contact when the add button is pressed. |
4 |
Text that is entered into the text field will be added to the list as a contact when the user hits return when the cursor is in the text field. |
5 |
The text label indicates to the user that a new contact was successfully added to the list ( feature #3 & 4 so they must be implemented prior to implementing this feature). |
6 |
The program won't add "empty" contacts to the list. If the text field doesn't contain any text when the add button is pressed or when the user hits return, then nothing will be added to the list. Again this feature must be implemented after feature #3 & 4 has already been completed. |
Because there aren't any demos for this assignment, this file must be complete enough so that your TA can understand exactly how to run all parts of your program.
File-based input and output:
1While you are allowed to implement your assignment using either the classes in the newer Swing packages or the older AWT packages officially we will be providing support only for AWT. That means that if are using SWING and get stuck then you may be one your own.
2) Sun's online SWING documentation: http://java.sun.com/j2se/1.4.2/docs/guide/swing/index.html