namespace HuntingBehavior { class Animal { eat ( ) { } } class Pet extends Animal { play ( ) { } } interface IHunter { track ( ) : void ; stalk ( ) : void ; pounce ( ) : void ; } class HuntingBehavior implements IHunter { pray : Animal | undefined ; track ( ) { } stalk ( ) { } pounce ( ) { } } class Cat extends Pet implements IHunter { private huntingBehavior : HuntingBehavior = new HuntingBehavior ( ) ; track ( ) { this . huntingBehavior . track ( ) ; } stalk ( ) { this . huntingBehavior . track ( ) ; } pounce ( ) { this . huntingBehavior . track ( ) ; } meow ( ) { } } }