-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJob.java
67 lines (52 loc) · 1.75 KB
/
Job.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
public class Job {
private int processID, burstTime, remainBurstTime, waitingTime, turnAroundTime, arrivalTime;
private boolean statusDone;
public Job(int processID, int arrival, int burstTime) {
this.processID = processID;
this.burstTime = burstTime;
this.arrivalTime = arrival;
this.remainBurstTime = burstTime;
this.statusDone = false; //false : working, true : Done
}
public void setStatusTrue(){ this.statusDone = true;}
public void setStatusFalse(){ this.statusDone = false;}
public boolean getStatusDone(){ return this.statusDone; }
public int getProcessID() {
return processID;
}
public void setProcessID(int processID) {
this.processID = processID;
}
public int getArrivalTime() {
return arrivalTime;
}
public int getBurstTime() {
return burstTime;
}
public void setBurstTime(int burstTime) {
this.burstTime = burstTime;
}
public int getRemainBurstTime() {
return remainBurstTime;
}
public void setRemainBurstTime(int remainBurstTime) {
this.remainBurstTime = remainBurstTime;
}
public int getWaitingTime() {
return waitingTime;
}
public void setWaitingTime(int waitingTime) {
this.waitingTime = waitingTime;
}
public int getTurnAroundTime() {
return turnAroundTime;
}
public void setTurnAroundTime(int turnAroundTime) {
this.turnAroundTime = turnAroundTime;
}
@Override
public String toString() {
return "Process [processID=" + processID + ", burstTime=" + burstTime + ", arrivalTime=" + arrivalTime + ", turnAroundTime=" + turnAroundTime
+ ", waitingTime=" + waitingTime + "]";
}
}