/FileExtraction/Java_unseen/infotechprogrammer_learn-java-programming/_08_Inheritance/_02_Multilevel_Inheritance/MultilevelInheritance.java
class Animal {
    void eat() {
        System.out.println("eating...");
    }
}

class Dog extends Animal {
    void bark() {
        System.out.println("barking...");
    }
}

class BabyDog extends Dog {
    void weep() {
        System.out.println("weeping...");
    }
}

class MultilevelInheritance {
    public static void main (String args[]) {
        BabyDog d = new BabyDog();
        d.weep();
        d.bark();
        d.eat();
    }
}
