/**File: JavaExamples/Lists/test_prof.java
 *   This is the Java implementation of C++Examples/Lists
 *   Note: the Java implementation uses a commercial implementation
 *         of the C++ STL in Java: JGL by Object Space
 */

import com.objectspace.jgl.*;// note: you must append the -classpath
// to the include the SGL class files:
// .:/afs/eos.ncsu.edu/users/k/kaltofen/www/courses/Languages/JavaExamples/jgl3.1.0/lib/jgl3.1.0.jar

public class test_prof{

public static void main(String[] args)
{PROF  caviness = new PROF("Caviness", "Bob",     'F', 100.0, 1, 4.5)
      ,kaltofen = new PROF("Kaltofen", "Erich",   'L',  50.0, 1, 3.0)
      ,saunders = new PROF("Saunders", "Benjamin",'D',  95.0, 2, 3.5)
      ; // initialization is by constructor args

 PROFLIST L = new PROFLIST();

 L.hire(caviness);
 // hire and fire are mem funs of PROFLIST

 System.out.println( L.toString() );

 L.hire(saunders); System.out.println( L.toString() );
 L.hire(kaltofen); System.out.println( L.toString() );

 L.fire("Kaltofen"); System.out.println( L.toString() );
 L.fire("Caviness"); System.out.println( L.toString() );
 L.fire("Clinton"); System.out.println( L.toString() );
} // end main
} // end class test_prof
