public class StudyGroup { static public void main(String args[ ]) { PizzaMonitor pm = new PizzaMonitor(); Leucadia lp; Student s[ ]; int slicesPerPizza = 0; if (args.length < 1) { System.err.println("arguments are slices/pizza and student names"); System.exit(1); } try { slicesPerPizza = Integer.parseInt(args[0]); } catch (NumberFormatException e) { System.err.println("Number of slices must be an integer"); System.exit(1); } lp = new Leucadia(pm, slicesPerPizza); lp.start(); s = new Student[args.length - 1]; for (int i = 0; i < s.length; i++) { s[i] = new Student(pm, args[i + 1]); s[i].start(); } } }