-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcess.java
More file actions
executable file
·56 lines (50 loc) · 1006 Bytes
/
Process.java
File metadata and controls
executable file
·56 lines (50 loc) · 1006 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
*
* @author Antonella Di Lillo
*
* Provided class file for PA3.
*
*/
public class Process {
private int id;
private int priority;
private String name;
/**
* Constructs a new Process.
* @param i The ID of the new Process
* @param p The Priority of the new Process
* @param n The Name of the new Process
*/
public Process(int i, int p, String n){
this.id = i;
this.priority = p;
this.name = n;
}
/**
* Gets the ID of the process
* @return the ID of the process
*/
public int getID(){
return id;
}
/**
* Gets the Priority of the Process
* @return the Priority of the process
*/
public int getPriority(){
return priority;
}
/**
* Gets the name of the Process
* @return the name of the process
*/
public String getName(){
return name;
}
/**
* A toString method to allow easy identification and printing for error checking.
*/
public String toString(){
return "NAME: " + name + " PRIORITY: " + priority + " ID: " + id;
}
}