// Bat.java [dynamic] import java.util.*; public class Bat extends Mammal implements Flier { // di implementation for Flier --------------- public void Takeoff() { trace("Bat.Takeoff():"); } public void Ascend() { trace("Bat.Ascend()"); } public boolean ThereYet(int x, int y) { trace( "Bat.ThereYet()" ); return true; } public void FlapTowards(int x, int y) { trace( "Bat.FlapTowards()" ); } public void Descend() { trace( "Bat.Descend():" ); } public void Land() { trace( "Bat.Land()" ); } // ============== for Flier Flier$Ego $flier = new Flier$Ego( $shrink ); public void Fly(int x, int y, int altitude) { if ( personifies( "Flier" ) ) $flier.Fly(this, x, y, altitude); } }