package bb;
public interface Animal {
abstract void cry();
abstract String getAnimalName();
}
package bb;
public class Application {
public static void main(String[] args) {
// TODO Auto-generated method stub
Simulator simulator=new Simulator();
simulator.playSound(new Dog());
simulator.playSound(new Cat());
}
}
<