public class D_c implements Animal //接口
{
public void Cry()
{
System.out.println("say:emmmmmiao???");
}
public void GetAnimalName()
{
System.out.println("Cat");
}
}
public class D_c1 implements Animal
{
public void Cry()
{
System.out.println("say:wuwuwuwuwuwang???");
}
public void GetAnimalName()
{
System.out.println("Dog");
}
}
public class APPlication
{
public static void main(String args[])
{
Simulator simulator=new Simulator();
simulator.playSound(new D_c());
simulator.playSound(new D_c1());
}
}