Table of Contents
2.4 GUI design and a brief user’s guide
In this project a Registration & Transcript Information System (RTIS) is developed using pure Java language. RTIS provides functions for registration, class management, transcript report and related queries. The GUI part of the program is implemented using Swing version 1.1 available in JFC release 1.1. The database is created using Microsoft Access 97. RTIS implements a 2-Tier Client/Server model in which the program talks to Access database through the Java JDBC-ODBC Bridge. It runs on any one of the following: the appletviewer provided in JDK, Java-enabled browsers that support Swing or have the latest Java Plug-in. Characteristics of this program are summarized as follows:
RTIS is designed to provide functions to access and manage information in a database system. To meet this goal, the system needs to be designed properly. Issues involved include the selection of an appropriate database access model. Database, function and GUI need to be designed properly.
JDBC API supports both two-tier and three-tier models for database access. This program implements the two-tier model in which RTIS directly talks to the database.
Data involved in the target system include information on student, course and transcript. According to database design theory, these data are organized into three tables: two entities and one relation. Student and course are model as two entities and transcript as a relation.
Implementation of this E-R model in MS Access is shown in Fig 2.3.
Fig 2.3 Implementation of the student-transcript-course database in Access
The data definition language (DDL) of the three tables is as follows:
CREATE_TABLE student (
first_name char (20) not null,
last_name char (20) not null,
id int,
phone char (10),
address char (50),
PRIMARY KEY (id)
);
CREATE_TABLE course (
id int,
prefix char (4) not null,
cos_umber char (3) not null,
title char (30) not null,
credits int,
PRIMARY KEY (id)
);
CREATE_TABLE transcript (
course_id int,
student_id int,
grade int,
year int,
quadmester char (8),
PRIMARY KEY (course_id, student_id)
);
RTIS should provide functions to access and manipulate data in the database as implemented above. For each table, RTIS provides functions to add, search and delete records. Another important function of this system is to create a transcript report for a given student. This report should include a photo, student information in the student table and transcripts of all courses taken by the student.
2.4 GUI design and a brief user’s guide
RTIS has three subsystems: Student, Course and Transcript Subsystems. Because these subsystems have similar data types and functions, prototypes of their GUI are essentially the same. Interfaces to the three subsystems are three tabs located on the top of Tabbedpane (Fig 2.4). These tabs are implemented using the JTabbedPane class. Details of the GUI of each subsystem when loaded in the Netscape browser are given below. The GUIs shown in other browsers are similar.
Fig 2.4 GUI when RTIS was first loaded in the Netscape browser
2.4.1 GUI for the Student Subsystem
The GUI for the student subsystem is essentially the same as that shown in Fig 2.4. There are 6 buttons linked to different functions of this subsystem, including search, add, delete, clear, transcript report and exit. Search can be used to find student record according to criteria given in the text field and checked in the corresponding check boxes to the left of the buttons. An example query using Last Name as the search criterion is given in Fig 2.5. If no check box is checked, the search function will retrieve all records from the student table.
Fig 2.5 Query results from search using Last Name "Zheng" as the search criterion
The Add function is used to add a student record to the student table. To do this check all check boxes and put data in the corresponding text fields, then press the Add button. To delete student records, put the criteria in appropriate text fields and check corresponding check boxes. The Delete function will delete student records that match the criteria. The Clear button clears data shown in text fields and the table. Press the Exit button will end this program.
The Transcript Report button can be used to create a transcript report for a student when the student’s record is shown and highlighted in the table. A student record can be loaded into the table using the search button. An example transcript report is given in Fig 2.6
Fig 2.6 An example report of student transcript
2.4.2 GUI for the Course and Transcript Subsystem
The GUI and functions of the course and transcript subsystems are very similar to those of the student subsystem. A major difference is that the functions apply to the course table and transcript table rather than the student table. Another difference is that the transcript report function is not available in these two subsystems. The GUIs of these two subsystems are given in Fig 2.7 and 2.8.
Fig 2.7 GUI of the Course subsystem and an example query using prefix "COSC" as the search criterion
Fig 2.8 GUI of the Transcript subsystem and an example query using student ID "83304" as the search criterion