class Delegator {
  var delegate;

  String operation() {
    if (delegate == null)
      return "default implementation";
    else
      return delegate.thing();
  }
}

class Delegate {
  String thing() => "delegate implementation";
}

main() {