Loading

Exercise Number: 1

Q. Create a class Animal with a method eat(), and a class Dog that inherits from Animal and has its own method bark(). Create a Dog object and call both methods.