//c.cathMouse();
}
/*public static void funtion(Dog d){
d.eat();
d.lookHome();
}
public static void funtion(Pig p){
p.eat();
p.gongDi();
}*/
}
abstract class Animal {
abstract public void eat();
}
class Cat extends Animal{
public void eat(){
System.out.println("喵吃鱼");
}
public void cathMouse(){
System.out.println("抓老鼠");
}
}
class Dog extends Animal {
public void eat(){
System.out.println(" kengutou");
}
public void lookHome(){
System.out.println("看家");
}
}
class Pig extends Animal{
public void eat(){
System.out.println("饲料");
}
public void gongDi(){
System.out.println("拱地");
}
}