Implementing Multilevel Inheritance

# Introduction In this lab, you will implement multilevel inheritance to create a program that defines a superclass called Animal with an eat() method, a subclass named Mammal that inherits from Animal and has a display() method, and another subclass called Dog that inherits from Mammal and has a displayName() method, and then use the main() method to get a user input for the name of a dog object, call the displayName() method to print the name, and call the display() method of Animal and the eat() method of Mammal using the dog object.

|
60 : 00

Click the virtual machine below to start practicing