/** * A test of the Dog class * * @author CSC 142 */ public class DogUser { public static void main(String[] args) { Dog rover = new Dog("Rover"); // feed the dog -> should work rover.eat("beef"); // play fetch rover.fetch(); rover.fetch(); rover.fetch(); rover.fetch(); rover.fetch(); // the dog shouldn't play fetch anymore rover.fetch(); // feed the dog the same food as before -> shouldn't work rover.eat("beef"); // feed the dog a different food -> should work rover.eat("chicken"); // play fetch again rover.fetch(); rover.fetch(); rover.fetch(); rover.fetch(); rover.fetch(); // the dog shouldn't play fetch anymore rover.fetch(); } }