/** * This class keeps track of the color and age of different dogs. * * @Anne DeFrance * @version September 16, 2002 */ public class Dog { // instance variables private int age; // the age of the dog private String color; // the color of the dog private String name; // the dog's name // constructors public Dog(String nam, String col, int a) { name = nam; color = col; age = a; } // mutators change the value of the instance variable public void setColor(String col) { color = col; } public void setName(String nam) { name = nam; } public void setAge(int dogAge) { age = dogAge; } //accessors return the value of an instance variable public String getColor() { return color; } public String getName() { return name; } public int getAge() { return age; } }