import java.util.Scanner;
public class TranslatorController {
public static void main(String[] args) throws IOException {
SourceLoader sourceLoader = new SourceLoader();
Translator translator = new Translator(new URLSourceProvider());
System.out.println("Input source to translate or type 'exit' to exit...");
Scanner scanner = new Scanner(System.in);
String command = scanner.next();
while (!"exit".equals(command)) try {
String source = sourceLoader.loadSource(command);
String translate = translator.translate(source);
System.out.println("English text: \n" + source);
System.out.println("Russian translation: \n" + translate);
System.out.println("Input source to translate or type 'exit' to exit...");
command = scanner.next();