-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcess.java
97 lines (73 loc) · 1.83 KB
/
Process.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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
public class Process{
private String processName;
private int arrivalTime, burstTime, priority, startExTime, endExTime, turnAround, waitTime, finishTime;
private static int processNum = 0;
public Process(){}
public Process(int aT, int bT, int p){
processName = "P" + processNum++;
arrivalTime = aT;
burstTime = bT;
priority = p;
}
public Process(Process p){
this.processName = p.getPName();
this.arrivalTime = p.getAT();
this.burstTime = p.getBT();
this.priority = p.getPriority();
}
public String getPName(){
return processName;
}
public int getAT(){
return arrivalTime;
}
public void setAT(int arrivalTime){
this.arrivalTime = arrivalTime;
}
public int getBT(){
return burstTime;
}
public void setBT(int burstTime){
this.burstTime = burstTime;
}
public int getPriority(){
return priority;
}
public int getStartExTime(){
return startExTime;
}
public void setStartExTime(int startExTime){
this.startExTime = startExTime;
}
public int getEndExTime(){
return endExTime;
}
public void setEndExTime(int endExTime){
this.endExTime = endExTime;
}
public int getTurnAround(){
return turnAround;
}
public void setTurnAround(int turnAround){
this.turnAround = turnAround;
}
public int getWaitTime(){
return waitTime;
}
public void setWaitTime(int waitTime){
this.waitTime = waitTime;
}
public int getFinishTime(){
return finishTime;
}
public void setFinishTime(int finishTime){
this.finishTime = finishTime;
}
public String tostring(){
return "| " + processName + "\t\t| " + arrivalTime + "\t\t| " + burstTime + "\t\t| " + finishTime + "\t\t| " + turnAround + "\t\t\t| " + waitTime + "\t\t| ";
}
@Override
public String toString(){
return "| " + processName + "\t\t| " + arrivalTime + "\t\t| " + burstTime + "\t\t| " + priority + "\t\t|";
}
}