program TurnstileMain { // checking the number of arguments /*if(programArguments.length==0){ System.out.println("The number of turnstiles is missing"); System.exit(1); }*/ Turnstile turnstiles[] = null; try{ //turnstiles= new Turnstile[Integer.parseInt(programArguments[0])]; turnstiles= new Turnstile[2]; }catch(NumberFormatException e){ e.printStackTrace(); System.exit(2); } channel []incrValue =new channel(int)[2] ; for(int i=0;i< turnstiles.length;i++){ incrValue[i]=new channel(int); } CounterFlat c; cobegin{ for(int i=0;i< turnstiles.length;i++){ turnstiles[i]= new Turnstile(incrValue[i]); } // done c = new CounterFlat(incrValue); } // cobegin } // program