-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathTask.java
55 lines (43 loc) · 1.16 KB
/
Task.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
import java.sql.Timestamp;
public class Task {
String description;
String info;
boolean done;
Timestamp timestamp;
public Task(String description, String info, boolean done, Timestamp timestamp) {
this.description = description;
this.info = info;
this.done = done;
this.timestamp = timestamp;
ToDoList.tasks.add(this);
}
public Task(String description, String info, Timestamp timestamp) {
this.done = false;
this.description = description;
this.info = info;
this.timestamp = timestamp;
ToDoList.tasks.add(this);
}
public boolean isDone() {
return done;
}
public void setDone(boolean done) {
this.done = done;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
@Override
public String toString() {
return description +"/"+ info +"/"+ done +"/"+ timestamp+"\n";
}
}