// Filename RoomReporterNT.java. import Counters.RoomMonitor; import java.util.Random; public class RoomReporterNT { RoomMonitor roomToReportOn; Random generator = new Random(); public RoomReporterNT( RoomMonitor theMonitor ) { roomToReportOn = theMonitor; } // End RoomFiller onstructor; public void start() { int delay; int count = 0; while ( count < 2) { /*** sleep() is available only to thread try { delay = 800 + (int) (generator.nextDouble() * 800.0); this.sleep( delay); } catch ( InterruptedException exception ){ // Do nothing. } ***/ System.out.println( roomToReportOn); count += 1; } } }