CS411X - Lecture 13

homeContentsIndexPrev

Lecture Topic:

This way, the Applet Frame need not concentrate on closing event as the parent frame

Closable Frame handles the Window destroy event. This is infact a neet idea.

Bugs in JDK 1.02

Save as

    FileDialog fd = new FileDialog(this ,"save as...", fileDialog.SAVE);
 
        fd.show( );
 
        String fn = fd.getFile( );
 
        if( fn != null ){
 
            if( fn.endswith(" *.* ")){
 
                  fn = fn.substring( 0, fn.length( ) - 4 );
 
                  String fqn = fd.getDirectory( ) + fn;
 
        ......
 

The above bug mentioned, is when a file is saved , it automatically

brings up *.* extension, with the file thereby resulting in a undefined

behaviour. This bug , we suppose is corrected in JDK 1.1

Parsing BTree

Finite state machine diagram is a directed graph ( diagraph )

An example class state can be defined as follows
class state{
 
      boolean flag = false;
 
      state left_child;
 
      state right_child;
 
      add_child_L(state S){
 
            left_child = S;
 
      }
 
      add_child_R(state S){
 
            right_child = S;
 
      }
 
      Array of states Ps[i]
 
      state stateArray[ ] = new state[10];
.......
An alternative definition of state class 
      class state{
 
            int LNext_state;
 
            int RNext_state;
 
            int x = getint( );
 
            int S = 0;
 
            S = stateArray[S].getNextsState(x);
 
            getNextState(int x){
 
                  if( x == 0 )
 
                       return LNext_state;
 
                  else
 
                       return RNext_state;
 
            }
.....

Priority Queue ADT

Sample Quiz

1. Methods in an interface are declared to be


 
homeContentsIndexPrev


UBLOGOLast Update: 04/09/97
Copyright © 1997- Douglas Lyon
Lyon@cse.bridgeport.edu