public class Student extends Thread {
     String name;
     PizzaMonitor pm;

     public Student (PizzaMonitor m, String n) {
	name = n;
	pm = m;
     }

     public void run() {
	while (true) {
	    pm.GetSlice();
	    System.out.println(name + " got a slice.");
	    try { sleep(3000); }
	    catch (java.lang.InterruptedException e) { };
	}
     }

}
