Tester

public class Tester {

   public static void main(String[] args) { 
      
      Animal it = new Animal(153, 5);	
      Animal doggy = new Dog(10, 4);
      Animal billy = new Man(50, 2, 153);

      System.out.println(it.getAge());
      System.out.println(doggy.getAge());
      System.out.println(billy.getAge());
      System.out.println(((Man)billy).getWeight());
   }
}
  

What is the output?
Be careful of the space/newline in your answer.

Man.java

public class Man extends Animal{

	private double weight;	
	public static final int NUM_OF_LEGS = 2;
	public static final int VENERABLE_AGE = 50;
	
	public Man(int age, int legs, double weight) {
		super(age, legs);
		this.weight = weight;
	}
	
	public double getWeight() {
		return weight;
	}
	
	public double computeSpeed() {
		return super.computeSpeed() * 10 / weight;
	}	
	
	public String speak () {
		if (getAge() < VENERABLE_AGE)
			return "How are you doing?";
		else 
			return "How are you doing, honey?";
	}
	
	public String toString() {
		return super.toString() + "[weight=" + weight + "]"; 
	}
	
	public boolean equals(Object anObject) {		
		Man man = (Man) anObject;
		return super.equals(anObject) && this.weight == man.weight;
	}
	
}

    

Animal.java

public class Animal {
	
	public static final int MINIMUM_SPEED = 10;
	
	private int age; 
	private int numOfLegs;
	
	public Animal(int age, int legs) {
		this.age = age; 
		numOfLegs = legs;
	}	
	
	public int getAge() {
		return age;
	}
	
	public int getNumOfLegs() {
		return numOfLegs;
	}
	
	public double computeSpeed() {
		return MINIMUM_SPEED * numOfLegs;
	}
	
	public String speak(){
		return "gibberish";
	}
	
	public String toString() {
		return getClass().getName() + "[age=" + age + "][legs=" + numOfLegs + "]";
	}
	
	public boolean equals(Object anObject) {
		Animal animal = (Animal) anObject;
		return this.age == animal.age && this.numOfLegs == animal.numOfLegs;
	}
	
}

    

Dog.java

public class Dog extends Animal {

	public static final int NUM_OF_LEGS = 4;
	
	public static final int VENERABLE_AGE = 10;
	
	public Dog(int age, int legs) {
		super(age, legs);
	}
	
	public double computeSpeed() {
		if (getAge() < VENERABLE_AGE)
			return super.computeSpeed();
		else 
			return super.computeSpeed() / 2.0;
	}	
	
	public String speak () {
		return "bow-wow";
	}

}