-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask_IM.java
More file actions
82 lines (73 loc) · 1.57 KB
/
Task_IM.java
File metadata and controls
82 lines (73 loc) · 1.57 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
76
77
78
79
80
81
82
/**
* This is a class that represents a task.
* The task has a name, priority, and complexity
*
* @IMukhametzhanova
* @1.8
* 4/8/19
*/
public class Task_IM implements Priority_IM, Complexity
{
private String type;
private int priority;
private int complexity;
/**
* This is the constructor for the Task_IM class
* It takes in the name of the task and its priority
*/
public Task_IM(String t, int p, int c)
{
type = t;
priority = p;
complexity = c;
}
/**
* This method changes the task's name to the entered one
*/
public void setType(String t)
{
type = t;
}
/**
* This method returns the task's name
*/
public String getType()
{
return type;
}
/**
* This method changes the task's priority to the entered one
*/
public void setPriority(int p)
{
priority = p;
}
/**
* This method returns the task's priority
*/
public int getPriority()
{
return priority;
}
/**
* This method changes the task's complexity to the entered one
*/
public void setComplexity(int c) {
complexity = c;
}
/**
* This method returns the task's complexity
*/
public int getComplexity()
{
return complexity;
}
/**
* This method returns a string with all of the task's information
*/
public String toString()
{
String output = type + "; Priority: " + priority + "; Complexity: " + complexity;
return output;
}
}