mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
Refactor ProcessDetails and PreemptivePriorityScheduling (#5448)
* Refactor ProcessDetails and PreemptivePriorityScheduling for consistency * fix formatting * fix formatting * Improve test readability and maintainability
This commit is contained in:
@ -6,6 +6,14 @@ public class ProcessDetails {
|
||||
private int burstTime;
|
||||
private int waitingTime;
|
||||
private int turnAroundTime;
|
||||
private int priority;
|
||||
|
||||
public ProcessDetails(final String processId, final int arrivalTime, final int burstTime, int priority) {
|
||||
this.processId = processId;
|
||||
this.arrivalTime = arrivalTime;
|
||||
this.burstTime = burstTime;
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public ProcessDetails(final String processId, final int arrivalTime, final int burstTime) {
|
||||
this.processId = processId;
|
||||
@ -33,6 +41,10 @@ public class ProcessDetails {
|
||||
return turnAroundTime;
|
||||
}
|
||||
|
||||
public int getPriority() {
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setProcessId(final String processId) {
|
||||
this.processId = processId;
|
||||
}
|
||||
|
Reference in New Issue
Block a user