-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.java
More file actions
39 lines (31 loc) · 946 Bytes
/
Main.java
File metadata and controls
39 lines (31 loc) · 946 Bytes
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
39
package schedulermanager;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
*
* @author Nycholas de Sousa
* @matricula 11228201
*
*/
public class Main {
public static Scanner input = new Scanner(System.in);
public static List<Process> processList = new ArrayList<Process>();
public static void main(String[] args) {
int processID = 0;
while (true) {
String in[] = input.nextLine().split(" ");
if (in[0].isEmpty() || in[1].isEmpty()) {
input.close();
break;
}
processList.add(new Process(++processID, Integer.parseInt(in[0]), Integer.parseInt(in[1])));
}
FCFS fcfs = new FCFS(processList);
SJF sjf = new SJF(processList);
RR rr = new RR(processList);
fcfs.print();
sjf.print();
rr.print();
}
}