public class DogDemo
1: public class DogDemo
2: {
3: public static void main(String[] args)
4: {
5: Dog balto = new Dog();
6: balto.name = "Balto";
7: balto.age = 8;
8: balto.breed = "Siberian Husky";
9: balto.writeOutput();
10:
11: Dog scooby = new Dog();
12: scooby.name = "Scooby";
13: scooby.age = 42;
14: scooby.breed = "Great Dane";
15: System.out.println(scooby.name + " is a " + scooby.breed + ".");
16: System.out.print("He is " + scooby.age + " years old, or ");
17: int humanYears = scooby.getAgeInHumanYears();
18: System.out.println(humanYears + " in human years.");
19: }
20: }