Objective
Create a Python program with an abstract class Animal that has a name and three methods: set_name(name), get_name() and eat(). The eat() method is abstract.
Instructions
- Create the class
Dog, which inherits fromAnimaland implementseat()by displaying that the dog is eating. - In the main program, ask the user for the name of a dog, create a
Dogobject, give it the name and callget_name()andeat().
Tobby
Tobby
Eating
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise