public class RobotOwner { private Robot harry; public RobotOwner() { // creating harry // first, we create new wheels for harry Stepper wheels = new Wheels(); // then, we 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 ); // switch him on. harry.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 harry off before I slept! // better do it now. harry.switchOff(); } }