Merge remote-tracking branch 'origin/dev' into renaming-executors

This commit is contained in:
2021-11-08 14:19:10 +01:00
102 changed files with 3676 additions and 144 deletions

View File

@@ -18,19 +18,28 @@ public class Executor extends ExecutorBase {
@Override
protected
String execution() {
String execution(String... input) {
double result = Double.NaN;
int a = Integer.parseInt(input[0]);
int b = Integer.parseInt(input[2]);
String operation = input[1];
int a = 20;
int b = 20;
try {
TimeUnit.SECONDS.sleep(20);
} catch (InterruptedException e) {
e.printStackTrace();
}
int result = a + b;
if (operation == "+") {
result = a + b;
} else if (operation == "*") {
result = a * b;
} else if (operation == "-") {
result = a - b;
}
return Integer.toString(result);
return Double.toString(result);
}
}
}