public class Dog { private final int AGE = 7; //number of dog years in a human year private String name; private int dogYears, humanYears; //********************************************************************** // Sets up the class by defining the dog it's name, it's age, and // it's age in human years. //********************************************************************** public Dog (String owner, int age) { name = owner; dogYears = age; // humanYears = peopleYears; } //*********************************************************************** // Computes the age in human years of the dogs //*********************************************************************** public int Years () { humanYears = (dogYears * AGE); return humanYears; } //*********************************************************************** // Gets the name of the Dog //*********************************************************************** public String getName() { return name; } //*********************************************************************** // Sets the name of the Dog //*********************************************************************** public String setName(String owner) { name = owner; return name; } //*********************************************************************** // Gets the age of the dog //*********************************************************************** public int getAge() { return dogYears; } //*********************************************************************** // Sets the dogs age //*********************************************************************** public int setAge(int age) { dogYears = age; return dogYears; } //*********************************************************************** // Prints out the dogs name, doggy years, and human years //*********************************************************************** public String toString() { return (name + " is " + dogYears + " in dog years and " + humanYears + " in human years."); } }