void main() {
AnimalEat animalEat = new Animal();
animalEat.eat();
AnimalTravel animalTravel = new Animal();
animalTravel.travel();
}
class AnimalEat {
void eat() {}
}
class AnimalTravel {
void travel() {}
}
class Animal implements AnimalEat, AnimalTravel {
void eat() {
print("Animal is eating");
}
void travel() {
print("Animal is travelling");
}
}
Output
Animal is eating
Animal is travelling