/** DumbRobotOwner does something wrong. Can you spot it? */ public class DumbRobotOwner { private Robot harry, sally; public DumbRobotOwner() { // creating harry and sally // create new wheels Stepper wheels = new Wheels(); // create a new Robot using the new wheels, // and the color pink, and refer to it as harry harry = new Robot( wheels, java.awt.Color.pink ); // create sally with wheels too, but with the color blue sally = new Robot( wheels, java.awt.Color.blue ); // switch both of them on. harry.switchOn(); sally.switchOn(); // Oh, I'm bored. Sleep for a while. try { Thread.sleep( 30*60*1000 ); // sleep for 30 minutes. } catch ( InterruptedException e ) { System.out.println( "Hey! Who woke me up?!!" ); } // oops! I forgot to turn them off before I slept! // better do it now. harry.switchOff(); sally.switchOff(); } }