class animals {
int id;
String name;
animals(int id,String name){
this.id=id;
this.name=name;
}
void eat(){
System.out.println(name+" is eating");
}
}
class cat extends animals{
String color;
cat(int id,String name,String color){
super(id,name);
this.color=color;
}
}
class testmethod{
public static void main(String[] args) {
cat tom=new cat(1,"tom","blue");
tom.eat();
}
}