class Animal{
public String kind;
void eat(){
}
void sleep(){
class Fish extends Animal{
String kind="Fish";
System.out.println(kind+" eating");
System.out.println(kind+" sleeping");}
class Dog extends Animal{
String kind="Dog";
public class E {
public static void main(String agrs[]){
Fish f=new Fish();
Dog d=new Dog();
f.eat();
f.sleep();
d.eat();
d.sleep();
class Animal{
public String kind;
void eat(){
}
void sleep(){
}
}
class Fish extends Animal{
String kind="Fish";
void eat(){
System.out.println(kind+" eating");
}
void sleep(){
System.out.println(kind+" sleeping");}
}
class Dog extends Animal{
String kind="Dog";
void eat(){
System.out.println(kind+" eating");
}
void sleep(){
System.out.println(kind+" sleeping");}
}
public class E {
public static void main(String agrs[]){
Fish f=new Fish();
Dog d=new Dog();
f.eat();
f.sleep();
d.eat();
d.sleep();
}
}