import { Dog } from "./Dog" ; import { Bird } from "./Bird" ; import { Animal } from "./Animal" ; import { FlyWithWings } from "./FlyingBehavior" ; const sparky = new Dog ( ) ; const tweety = new Bird ( ) ; console . log ( sparky . tryToFly ( ) ) ; console . log ( tweety . tryToFly ( ) ) ; sparky . setFlyingBehavior ( new FlyWithWings ( ) ) ; console . log ( sparky . tryToFly ( ) ) ;