class ShipLauncher {

  public void run(final String[] args) {
    if (args.length < 1) {
      messagePrinter.println(NL_0);
      exit(-1);
    } else {
      final CommandFactory commandFactory = new CommandFactory(messagePrinter);
      final Optional<Command> commandOpt = commandFactory.create(args);
      if (!commandOpt.isPresent()) {
        messagePrinter.println(NL_1, args[0]);
        exit(-1);
      }

      commandOpt.ifPresent(this::execute);
    }
  }

}