public class DogUser { /** * Tests the Dog class */ public static void main(String[] args) { Dog fido = new Dog("Fido"); fido.eat("Meat"); // OK fido.eat("Rice"); // fido shouldn't eat since it is not hungry fido.rollOver(); // OK fido.fetch(); //OK fido.rollOver(); // OK fido.fetch();// OK fido.rollOver(); // OK fido.fetch(); // Won't fetch since hungry fido.eat("Meat"); // shouldn't eat fido.eat("Rice"); // should eat fido.fetch(); fido.rollOver(); } }