public class AnimalSimulator {
public static void main(String[] args) {
Animal animal = new Cat();
animal.display();
animal.doMove();
Animal anotherAnimal = new Fish();
anotherAnimal.display();
anotherAnimal.doMove();
Animal theOtherAnimal = new Bird();
theOtherAnimal.display();
theOtherAnimal.doMove();
theOtherAnimal.setMove(new WalkBehavior());
theOtherAnimal.doMove();
}
}