forked from nus-cs2103-AY2223S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Task.java
41 lines (33 loc) · 812 Bytes
/
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
package duke;
import java.time.LocalDate;
/**
* An abstraction for a task in Duke.
*/
public abstract class Task {
private String description;
private boolean marked;
/**
* Constructor for the Task class.
*
* @param description The task description.
*/
public Task(String description) {
this.description = description;
this.marked = false;
}
public abstract String getType();
public abstract LocalDate getDate();
public String getDescription() {
return description;
}
public boolean getMarked() {
return this.marked;
}
public void setMarked(boolean b) {
this.marked = b;
}
@Override
public String toString() {
return "[" + (marked ? "X" : " ") + "] " + description;
}
}