-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
38 lines (32 loc) · 1.06 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2020
// Author: Matei Simtinică
import java.io.IOException;
class Main {
public static void main(String[] args) throws IOException, InterruptedException {
Task task = null;
if (args.length < 5) {
System.err.println("Usage: ./main <task> <input_file> <SAT_input_file> <SAT_output_file> <output_file>\n");
System.exit(-1);
}
String taskNumber = args[0];
String input = args[1];
String satInput = args[2];
String satOutput = args[3];
String output = args[4];
switch (taskNumber) {
case "task1":
task = new Task1(); break;
case "task2":
task = new Task2(); break;
case "task3":
task = new Task3(); break;
case "bonus":
task = new BonusTask(); break;
default :
System.err.println("Not a valid task");
System.exit(-1);
}
task.addFiles(input, satInput, satOutput, output);
task.solve();
}
}