interface Drivable { start ( ) : void ; drive ( distance ) : boolean ; getPosition ( ) : number ; } class Car implements Drivable { private _isRunning : boolean ; private _distanceFromStart : number ; constructor ( ) { this . _isRunning = false ; this . _distanceFromStart = 0 ; } /**
    *   Starts the car's ignition so that it can drive.
    */ public start ( ) { this . _isRunning = true ; } param { number } distance returns { boolean } public drive ( distance ) { if ( this . _isRunning ) { this . _distanceFromStart += distance ; return true ; } return false ; } returns { number } public getPosition ( ) { return this . _distanceFromStart ; } }