CPSC-102: Computing and Algorithms II

Programming Assignment 5

Summer 1998

In this programming assignment, you will demonstrate your knowledge of graphical user interfaces by revising the video database program from Programming Assignment 4 to incorporate a graphical user interface.

New Requirements

For this assignment, you should add a graphical user interface to your book database program. All user input and program output should be conducted through a graphical interface. (Thus, you should never need to use the System.in and System.out objects, except for debugging purposes.)

All previous functionality in Programming Assignment 4 should be available and functional through the graphical user interface. It should be possible to perform any and every function possible in Programming Assignment 4 in your new version.

You may use any of the standard Java AWT components, in any combination you wish, in order to implement your GUI. You should use the Java 1.1 event model (i.e. the one presented in class) to interface these components with your application code. Your program should be an application, not an applet.

Your program will be graded not only on correctness, but on the appropriateness of your design and its ease of use. It should be fairly obvious to a semi-intelligent person (such as your instructor) how to use the interface: which buttons perform which actions, which fields contain which information, and so on. This does not mean that your GUI needs to be artistically beautiful (indeed, sometimes beautiful GUIs are terribly difficult to use). However, it does mean that components should be layed out in a manner that allows a reasonable user to figure out how to use the program with a minimum of effort.

Submitting Your Program

Before 11:59:59 p.m., Thursday, 17 September 1998 (11th Thursday), you must email a single file to jhuggins@kettering.edu containing all source code files for your program, including a file named Prog5.java containing a main method.

In addition, you must deliver to the instructor a printout of your program files at the start of class on Friday, 18 September 1998 (11th Friday).


  1. Start Early! The event-driven programming model is very different from conventional sequential programming, and it may take you awhile to understand how to organize your program. Amidst all your final projects, please set aside some time to work on this early.
  2. Much of the information you need about the Java AWT is distributed through the Java API; take some time to look around and explore. You may be pleasantly surprised at some of the standard Java AWT components which are available to you ...
  3. Be aware that the submission date is the last day of class; late submissions become extremely difficult to handle after that date.
  4. Debugging Hint: While your program should never need to use the System.out object for its operation, you may wish to use it for debugging purposes. For example, it may be very handy to place println() statements inside your listener classes, so that you can tell when events are being generated and who is handling them. Alternatively, you may want to leave some of your old print methods in place, so that you can compare the text-based output with your GUI-oriented output. (Of course, these statements should be commented out or removed when the program is complete.)

Jim Huggins / jhuggins@kettering.edu
last updated: 9 September 1998