public class Domestic extends Animal
1: //Domestic.java
3: public class Domestic extends Animal
4: {
5: private String owner;
7: public Domestic
8: (
9: String domesticName,
10: int domesticAge,
11: String domesticOwner
12: )
13: {
14: this.name = domesticName;
15: this.age = domesticAge;
16: this.owner = domesticOwner;
17: }
19: public void printInfo()
20: {
21: String nameAndAge = this.getNameAndAge();
23: System.out.println(nameAndAge);
24: System.out.println("Owner: " + this.owner);
25: }
26: }