/* * File: TestCyberPet.java * Author: Java, Java, Java * Description: This application serves as a user interface to * the CyberPet class. It creates two CyberPets and "orders" * them to eat and sleep. */ public class TestCyberPet { public static void main (String argv[]) { // Execution starts here System.out.println("main() is starting"); CyberPet pet1; // Declare two references CyberPet pet2; pet1 = new CyberPet(); // Instantiate the references pet2 = new CyberPet(); // by creating new objects pet1.sleep(); // Tell pet1 to sleep. pet1.eat(); // Tell pet1 to eat. pet2.sleep(); // Tell pet2 to sleep. System.out.println("main() is finished"); return; // return to the system } // main() } // TestCyberPet