-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.java
More file actions
executable file
·75 lines (56 loc) · 1.68 KB
/
source.java
File metadata and controls
executable file
·75 lines (56 loc) · 1.68 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import java.io.File;
import java.util.PriorityQueue;
import exception_error_pack.PSSexception;
import gui.InputUI;
import mini_pack.Process;
import app_pack.FileHandlerInput;
import app_pack.FileHandlerOutput;
import app_pack.ProcessScheduler;
public class source
{
public static void test_ProcessScheduler() throws PSSexception
{
ProcessScheduler testPS = new ProcessScheduler(0,10);
testPS.background_queue.clear();
// test case 1
testPS.background_queue.add(new Process(1, 0f, 50, 1));
testPS.background_queue.add(new Process(2, 20.5f, 20, 2));
testPS.background_queue.add(new Process(3, 35.5f, 100, 3));
testPS.background_queue.add(new Process(4, 35.2f, 40, 4));
// test case 2
// testPS.background_queue.add(new Process(1, 0f, 30, 1));
// testPS.background_queue.add(new Process(2, 10.0f, 10, 2));
// testPS.background_queue.add(new Process(3, 12.0f, 8, 3));
// testPS.background_queue.add(new Process(4, 15.0f, 5, 4));
testPS.WRR();
testPS.printEventList();
System.out.println("finish");
}
public static void test_FileHandlerInput()
{
FileHandlerInput FIO = new FileHandlerInput();
try
{
FIO.Read("/home/mohamedmayla/workspace/InfinityDream_PSS/input.txt");
FIO.test_print();
System.out.println("finish");
} catch (Exception e)
{
e.printStackTrace();
}
}
public static void test_FileHandlerOut() throws PSSexception
{
FileHandlerOutput FHO = new FileHandlerOutput();
FHO.test_print();
}
public static void main(String[] args) throws PSSexception
{
//test_ProcessScheduler();
//test_FileHandlerInput();
//test_FileHandlerOut();
//RUN program
InputUI frame = new InputUI();
frame.setVisible(true);
}
}