Question 11
Consider the following code:
class Animal { public void makeSound() { System.out.println("Animal makes a sound"); }}class Dog extends Animal { public void makeSound(String s) { makeSound(); System.out.println("Dog " + s); }}public class TestAnimals { public static void main(String[] args) { Animal myPet = new Dog(); //CODE SEGMENT }}Choose the correct option to fill in the CODE SEGMENT so that the output is:
Animal makes a sound
Dog barks