-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDeadline.java
More file actions
40 lines (32 loc) · 904 Bytes
/
Copy pathDeadline.java
File metadata and controls
40 lines (32 loc) · 904 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
package linqing.tojava;
/**
* deadline task description /by deadline description: add to the task list a deadline task with the given task
* description and with the deadline description
*
* @inheritDoc
* @see linqing.tojava.ToDo
*/
public class Deadline extends ToDo {
public String by;
public Deadline(String description) {
super(description.split("/by")[ 0 ]);
setDeadline(description.split("/by")[ 1 ]);
saveTask(2, "do by:" + by);
}
public Deadline(String description, String by) {
super(description);
this.by = by;
}
public void setDeadline(String deadline) {
this.by = deadline;
}
public String getDeadline() {
return by;
}
public void saveTask(int level, String info) {
super.saveTask(level, info);
}
public String toString() {
return super.toString(2);
}
}