package threadsdemo;
/** 
 * das Hauptprogramm der Museums-Simulation nach Judy Bishop
 *
 * @author Ralph Matthes (Original: Judy Bishop) 
 * @version $Revision: 1.2 $ from $Date: 1999/11/16 23:05:14 $ (+1 Stunde)
 */
class WalkmanHire {
    /** 
     * Ein endlos laufendes Programm mit Ausgabe der Simulation der
     * Leihvorgänge auf die Standardausgabe
     *
     * @param args args[0] sei die Anzahl der Walkmen,  
     *  args[1] die Anzahl der Schalter
     */
  public static void main (String [] args) {

    // Get the number of walkmen in the pool
    // and open the museum for business.
    if (args.length >= 1)
      pool = Integer.parseInt(args[0]);
    else pool = 50;
    Museum m = new Museum (pool);

    // Get the number of helpers 
    // and open the counters.
    if (args.length >= 2)
      helpers = Integer.parseInt(args[1]);
    else helpers = 6;
    System.out.println("Museum eröffnet mit "+pool+" Walkmen und "+
		       helpers+" Schaltern");
    for (int i=0; i<helpers; i++) 
      new Counter (m,i).start();
  }
    /** 
     * Zahl der Walkmen
     */
  static int pool;
    /**
     * Zahl der Schalter
     */
  static int helpers;
}

//- Local Variables:
//- jde-read-compile-args: t
//- jde-compiler: "javac-1.2"
//- End:
