namespace CircleAdapter { class Shape { id : string ; constructor ( id ) { this . id = id ; } } class Point { x : number ; y : number ; constructor ( x , y ) { this . x = x ; this . y = y ; } } class Circle extends Shape { center : Point ; radius : number ; constructor ( id , center , radius ) { super ( id ) ; this . center = center ; this . radius = radius ; } } namespace GeometryLibrary { export interface ICircle { getCenterX ( ) : number ; getCenterY ( ) : number ; getDiameter ( ) : number ; } } class CircleAdapter implements GeometryLibrary . ICircle { private circle : Circle ; constructor ( circle ) { this . circle = circle ; } getCenterX ( ) { return this . circle . center . x ; } getCenterY ( ) { return this . circle . center . y ; } getDiameter ( ) { return this . circle . radius * 2 ; } } }