Description for Assignment 1.
---> OnLine Sign-Up Applet for Tennis Club



(1) Description of the Problem
(2) Description of the Algorithm and Overview of the Program
(3) References


Description of Program

This applet is for the on-line sign up system of Drummlin Tennis Club. To avoid the conflict of players practicing time,
Every one who want to use these court should sign up through the internet.

For this, several function are required for.
1. "SHOW"  : show all the time schedule which are already signed up
2. "CHECK" : check his/her own time table or someone else's
3. "SIGN" : sign up for use of court
4. "CANCEL" : cancel the reservation

In addition to this, there are two more function to communicate with database.
5. "CONNECT" : connect to oracle server
6. "CLOSE" : close connection to oracle server

To implemenet this applet, JDBC 2-tier model is used.
User do input the information through GUI (Applet) and this action is invoke database (JDBC) file to send the SQL query to oracle server.
database file-courtDB gets the result from database and display them on Display Area.
General error is captured inside program and program let user notice it by showing message. And SQLException and other Exceptions are also
displayed.
 

Descrpition of the Algorithm and Overview of the Program
 

    Link To Program Flow Diagram   :  pflow.gif
 

Database

There are two table for this program.
Each table represents 'courtA' and 'courtB' respectively.
 
Field atable btable
- NAME - NAME
- DATE - DATE
- TIME - TIME

To create and to load database into oracle, each of table need script file (.sql) and control file (.ctl)
They are 'acreate.sql', 'bcreate.sql', 'atable.ctl' and 'btable.ctl'.
 

Java Program
 

import java.awt.*;
import java.net.*;
import java.io.*;
import java.applet.*;
import java.awt.event.*;

public class myApplet extends Applet
             implements ActionListener, ItemListene

public void init()
public void actionPerformed(ActionEvent event)
public void itemStateChanged(ItemEvent event)
public void show_msg(String s)
 

import java.sql.*;
import java.util.Properties;

class courtDB

public void open(StringBuffer msg)
public void show(myApplet my)
public void search(myApplet my)
public void insert(String n_name, String n_day, String n_time, String wh_side, StringBuffer msg) {
public void delete(myApplet my)
public void close()
 

Reference

I use several part code from Examples of course WebPage and Core Java 1.1 ( QueryDB.java )