Please write your name and lab section letter at the top of the page.
What is printed by the following?
The number... in base... equals the number... in base... 101 2 5 10 1010 2 10 87 10 2 110001 2 7
public class Animal {
public String toString() { return "peep"; }
}
public class Dog extends Animal {
public String toString() { return "arf"; }
}
public class Schnauzer extends Dog
public String toString() { return "yap"; }
}
Animal yak = new Animal();
Dog dog = new Dog();
Dog bruno = new Schnauzer();
Transcript.println("Yak says " + yak.toString());
Transcript.println("Dog says " + dog.toString());
Transcript.println("Bru says " + bruno.toString());