forked from nus-cs2103-AY1920S1/duke
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import java.text.ParseException; | ||
import java.text.SimpleDateFormat; | ||
|
||
class Parser { | ||
public void formatTime(String time) throws ParseException { | ||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HHmm"); | ||
sdf.parse(time); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import java.util.ArrayList; | ||
|
||
public class TaskList { | ||
|
||
private ArrayList<Task> taskList = new ArrayList<>(); | ||
|
||
public TaskList(ArrayList<Task> taskList) { | ||
this.taskList = taskList; | ||
} | ||
|
||
public void addTask(Task task) { | ||
taskList.add(task); | ||
} | ||
|
||
public void deleteTask(int taskNum) { | ||
this.taskList.remove(taskNum); | ||
} | ||
|
||
public ArrayList<Task> getTaskList() { | ||
return taskList; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import java.util.ArrayList; | ||
import java.util.Scanner; | ||
|
||
public class Ui { | ||
|
||
private Scanner sc = new Scanner(System.in); | ||
protected static ArrayList<Task> taskList = new ArrayList<>(); | ||
|
||
String line = " ____________________________________________________________\n"; | ||
|
||
public void greet() { //duke greet | ||
System.out.println(line + | ||
" Hello! I'm Duke\n" + | ||
" What can I do for you?\n" + line); | ||
} | ||
|
||
public void farewell() { | ||
System.out.println(line + " Bye. Hope to see you again soon!\n" + line); | ||
} | ||
|
||
} |