From 2ad3d0441815591c53be4ef36391936444ec66e5 Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Mon, 31 Aug 2020 11:49:55 +0800 Subject: [PATCH 01/10] Level 0. Greet --- src/main/java/Duke.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5d313334cc..3907c5350a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -6,5 +6,16 @@ public static void main(String[] args) { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); + greeting(); + } + + public static void greeting(){ + String line = "____________________________________________________________"; + System.out.println(line); + System.out.println(" Hello! I'm Duke"); + System.out.println(" What can I do for you?"); + System.out.println(line); + System.out.println(" Bye. Hope to see you again soon!"); + System.out.println(line); } } From 6f3599a975bf59cba2f689d6176955abfcda6968 Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Mon, 31 Aug 2020 14:11:44 +0800 Subject: [PATCH 02/10] Level 1. Greet, Echo, Exit --- src/main/java/Duke.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 3907c5350a..de6fcb166c 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,5 @@ +import java.util.Scanner; + public class Duke { public static void main(String[] args) { String logo = " ____ _ \n" @@ -6,7 +8,20 @@ public static void main(String[] args) { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); - greeting(); + //Generates a greeting + //greeting(); + Scanner in = new Scanner(System.in); + String line; + while(true) { + line = in.nextLine(); + if (line.equals("bye")){ + System.out.println("Bye. Hope to see you again soon!"); + break; + } else { + System.out.println(line); + } + } + } public static void greeting(){ From bd0df5e93f38dcb3381fe32ad4c77fe8e6fd4c08 Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Mon, 31 Aug 2020 14:43:05 +0800 Subject: [PATCH 03/10] Level 2. Add, List --- src/main/java/Duke.java | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index de6fcb166c..a3fd1938f0 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -8,29 +8,35 @@ public static void main(String[] args) { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); + request(); //Generates a greeting //greeting(); + + + } + + public static void request(){ Scanner in = new Scanner(System.in); + String[] list = new String[100]; String line; + + int i=0,j=0; + while(true) { line = in.nextLine(); if (line.equals("bye")){ System.out.println("Bye. Hope to see you again soon!"); break; - } else { - System.out.println(line); + }else if(line.equals("list")){ + for(j=0;j Date: Mon, 31 Aug 2020 17:24:42 +0800 Subject: [PATCH 04/10] Level 3. Mark as Done --- src/main/java/Duke.java | 40 ++++++++++++++++++++++++---------------- src/main/java/Task.java | 15 +++++++++++++++ 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 src/main/java/Task.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index a3fd1938f0..6859852522 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,42 +1,50 @@ import java.util.Scanner; + public class Duke { public static void main(String[] args) { - String logo = " ____ _ \n" - + "| _ \\ _ _| | _____ \n" - + "| | | | | | | |/ / _ \\\n" - + "| |_| | |_| | < __/\n" - + "|____/ \\__,_|_|\\_\\___|\n"; - System.out.println("Hello from\n" + logo); - request(); //Generates a greeting - //greeting(); - - + greeting(); + request(); } public static void request(){ Scanner in = new Scanner(System.in); - String[] list = new String[100]; + Task[] list = new Task[100]; String line; - - int i=0,j=0; + int i=0,j; while(true) { + String status ="[✗] "; line = in.nextLine(); + if (line.equals("bye")){ System.out.println("Bye. Hope to see you again soon!"); break; }else if(line.equals("list")){ for(j=0;j Date: Tue, 8 Sep 2020 23:28:22 +0800 Subject: [PATCH 05/10] Level 4. ToDos, Events, Deadlines --- src/main/java/Deadline.java | 11 ++++ src/main/java/Duke.java | 112 +++++++++++++++++++++++++----------- src/main/java/Event.java | 11 ++++ src/main/java/Task.java | 14 ++++- src/main/java/ToDo.java | 10 ++++ 5 files changed, 123 insertions(+), 35 deletions(-) create mode 100644 src/main/java/Deadline.java create mode 100644 src/main/java/Event.java create mode 100644 src/main/java/ToDo.java diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java new file mode 100644 index 0000000000..0a0ef60ec3 --- /dev/null +++ b/src/main/java/Deadline.java @@ -0,0 +1,11 @@ +public class Deadline extends Task { + public Deadline(String description, String deadline) { + super(description); + this.deadline=deadline; + } + + @Override + public String toString() { + return "[D]" + super.toString() + "(" + this.deadline + ")"; + } +} diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 6859852522..867f9fb482 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -2,49 +2,97 @@ public class Duke { + public static int listCount = 0; + public static Task[] list = new Task[100]; + + public static void main(String[] args) { //Generates a greeting - greeting(); + greet(); request(); } - public static void request(){ - Scanner in = new Scanner(System.in); - Task[] list = new Task[100]; - String line; - int i=0,j; - - while(true) { - String status ="[✗] "; - line = in.nextLine(); + public static void bidGoodbye(){ + System.out.println("Bye. Hope to see you again soon!"); + } - if (line.equals("bye")){ - System.out.println("Bye. Hope to see you again soon!"); - break; - }else if(line.equals("list")){ - for(j=0;j Date: Tue, 22 Sep 2020 22:58:52 +0800 Subject: [PATCH 06/10] Level 6. Delete --- src/main/java/Duke.java | 113 +++++++++++++++++++++++++++++----------- src/main/java/Task.java | 3 ++ 2 files changed, 86 insertions(+), 30 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 867f9fb482..8bcc1328ce 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,9 +1,17 @@ -import java.util.Scanner; +//package duke; + +//import duke.task.Deadline; +//import duke.task.Event; +//import duke.task.Task; +//import duke.task.ToDo; +import java.util.Scanner; +import java.lang.String; +import java.util.ArrayList; public class Duke { public static int listCount = 0; - public static Task[] list = new Task[100]; + public static ArrayList list = new ArrayList<>(); public static void main(String[] args) { @@ -19,44 +27,82 @@ public static void bidGoodbye(){ public static void printList(){ int i; for (i = 0; i < listCount; i++) { - System.out.println(listCount + "." + list[i]); + System.out.println((i+1) + "." + list.get(i)); } } - public static void markDone(String word){ - int num = Integer.parseInt(word); - list[num - 1].isDone = true; - System.out.println("Nice! I've marked this task as done:"); - System.out.println("[✓] " + list[num - 1].description); - System.out.println("Now you have " + listCount + " tasks in the list"); + public static void markDone(String word) { + try { + int num = Integer.parseInt(word); + Task task = list.get(num); + task.markDone(); + System.out.println("Nice! I've marked this task as done:"); + System.out.println("[✓] " + list.get(num - 1).description); + System.out.println("Now you have " + listCount + " tasks in the list"); + }catch (ArrayIndexOutOfBoundsException e) { + System.out.println("Cannot find the task"); + } } - public static void todo(String line){ - list[listCount] = new ToDo(line); - System.out.println("Got it. I've added this task:"); - System.out.println(list[listCount]); - System.out.println("Now you have " + listCount + " tasks in the list"); - listCount++; + public static void todo(String line) { + try { + Task newTask = new ToDo(line); + list.add(newTask); + listCount++; + System.out.println("Got it. I've added this task:"); + System.out.println(line); + System.out.println("Now you have " + listCount + " tasks in the list"); + + }catch(ArrayIndexOutOfBoundsException e){ + System.out.println("____________________________________________________________\n" + + "0x00002639 OOPS!!! The description of a todo cannot be empty."); + System.out.println("____________________________________________________________\n"); + } } public static void Event(String line){ - int index = line.indexOf('/'); - list[listCount] = new Event(line.substring(0,index-1),line.substring(index+1)); - System.out.println("Got it. I've added this task:"); - System.out.println(list[listCount]); - System.out.println("Now you have " + listCount + " tasks in the list"); - listCount++; + try{ + int index = line.indexOf('/'); + Task newTask = new Event(line.substring(0, index), line.substring(index + 1)); + list.add(newTask); + System.out.println("Got it. I've added this task: "+list.get(listCount).description); + listCount++; + System.out.println("Now you have " + listCount + " tasks in the list"); + + }catch(ArrayIndexOutOfBoundsException e){ + System.out.println("____________________________________________________________\n" + + "☹ OOPS!!! The description of an event cannot be empty."); + System.out.println("____________________________________________________________\n"); + } + } + + public static void Deadline(String line) { + try { + int index = line.indexOf('/'); +// Task task = list.get(listCount); + Task newTask = new Deadline(line.substring(0, index), line.substring(index + 1)); + list.add(newTask); + System.out.println("Got it. I've added this task:"); + System.out.println(list.get(listCount).description); + listCount++; + System.out.println("Now you have " + listCount + " tasks in the list"); + + }catch(ArrayIndexOutOfBoundsException e){ + System.out.println("____________________________________________________________\n" + + "☹ OOPS!!! The description of a deadline cannot be empty."); + System.out.println("____________________________________________________________\n"); + } } - public static void Deadline(String line){ - int index = line.indexOf('/'); - list[listCount] = new Deadline(line.substring(0,index-1),line.substring(index+1)); - System.out.println("Got it. I've added this task:"); - System.out.println(list[listCount]); - System.out.println("Now you have " + listCount + " tasks in the list"); - listCount++; + public static void Delete(String taskNumber){ + int num = Integer.parseInt(taskNumber); + Task task = list.get(num-1); + list.remove(num-1); + System.out.println("Removed: " + task.description); + System.out.println("Now you have: " + list.size() + " task(s) in your list!"); } + public static void greet(){ System.out.println("Hello! I'm Duke"); System.out.println("What can I do for you?"); @@ -87,12 +133,19 @@ public static void request() { case "deadline": Deadline(line.substring(9)); break; + case "delete": + Delete(line.substring(7)); + break; default: - System.out.println("Command not supported"); + System.out.println("I don't know what that means"); + break; } } } -} \ No newline at end of file + + +} + diff --git a/src/main/java/Task.java b/src/main/java/Task.java index eb7add96c7..7b0ef2f5e8 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -14,6 +14,9 @@ public Task(String description) { public String statusicon(){ return (this.isDone?"[✓]":"[✗]"); } + public void markDone(){ + this.isDone = true; + } @Override public String toString(){ return statusicon() + description; From bd23a9f381d34c0474a63d143f1dcbbf953624c5 Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Wed, 23 Sep 2020 00:13:36 +0800 Subject: [PATCH 07/10] Level 7. Save --- src/main/java/Deadline.java | 4 +- src/main/java/Duke.java | 79 +++++++++++++++++++++++++++++++++++-- src/main/java/Event.java | 6 +-- src/main/java/Task.java | 15 ++++--- 4 files changed, 91 insertions(+), 13 deletions(-) diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index 0a0ef60ec3..379a6ab909 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -1,11 +1,11 @@ public class Deadline extends Task { public Deadline(String description, String deadline) { super(description); - this.deadline=deadline; + this.date=deadline; } @Override public String toString() { - return "[D]" + super.toString() + "(" + this.deadline + ")"; + return "[D]" + super.toString() + "(" + this.date + ")"; } } diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 8bcc1328ce..48dc853556 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -5,18 +5,24 @@ //import duke.task.Task; //import duke.task.ToDo; +import java.io.FileWriter; import java.util.Scanner; import java.lang.String; import java.util.ArrayList; +import java.io.IOException; +import java.io.File; +import java.io.FileWriter; public class Duke { + public static final String filePath = "duke.txt"; public static int listCount = 0; public static ArrayList list = new ArrayList<>(); - public static void main(String[] args) { + public static void main(String[] args) throws IOException { //Generates a greeting greet(); + fileLoad(); request(); } @@ -35,7 +41,7 @@ public static void markDone(String word) { try { int num = Integer.parseInt(word); Task task = list.get(num); - task.markDone(); + task.isDone = true; System.out.println("Nice! I've marked this task as done:"); System.out.println("[✓] " + list.get(num - 1).description); System.out.println("Now you have " + listCount + " tasks in the list"); @@ -47,6 +53,7 @@ public static void markDone(String word) { public static void todo(String line) { try { Task newTask = new ToDo(line); + newTask.type = 'T'; list.add(newTask); listCount++; System.out.println("Got it. I've added this task:"); @@ -64,6 +71,7 @@ public static void Event(String line){ try{ int index = line.indexOf('/'); Task newTask = new Event(line.substring(0, index), line.substring(index + 1)); + newTask.type = 'E'; list.add(newTask); System.out.println("Got it. I've added this task: "+list.get(listCount).description); listCount++; @@ -79,8 +87,8 @@ public static void Event(String line){ public static void Deadline(String line) { try { int index = line.indexOf('/'); -// Task task = list.get(listCount); Task newTask = new Deadline(line.substring(0, index), line.substring(index + 1)); + newTask.type = 'D'; list.add(newTask); System.out.println("Got it. I've added this task:"); System.out.println(list.get(listCount).description); @@ -108,6 +116,68 @@ public static void greet(){ System.out.println("What can I do for you?"); } + + public static void fileLoad() throws IOException { + File dataFile = new File(filePath); + if (dataFile.createNewFile()) { + System.out.println("Since the file does not exist, I have created a file for you."); + } + Scanner dataScanner = new Scanner(dataFile); + + while (dataScanner.hasNext()) { + String data = dataScanner.nextLine(); + String type = data.substring(0,1); + String info = data.substring(8); + int dateIndex = info.indexOf('|'); + switch(type){ + case "D": + Task newDeadline = new Deadline(info.substring(0, dateIndex), info.substring(dateIndex + info.length()-1)); + newDeadline.type = 'D'; + newDeadline.isDone = data.charAt(4)=='1'; + list.add(newDeadline); + break; + case "T": + Task newTodo = new ToDo(info); + newTodo.type = 'T'; + newTodo.isDone = data.charAt(4)=='1'; + list.add(newTodo); + break; + case "E": + Task dateEvent = new Event(info.substring(0, dateIndex), info.substring(dateIndex + info.length()-1)); + dateEvent.type = 'D'; + dateEvent.isDone = data.charAt(4)=='1'; + list.add(dateEvent); + break; + default: + break; + } + } + + } + public static void Save(){ + final String FILE_DIR = "data"; + final String FILE_PATH = "data/data.txt"; + + FileWriter writer; + File fileDir = new File(FILE_DIR); + + if (!fileDir.exists()){ + fileDir.mkdir(); + } + + try { + writer = new FileWriter(FILE_PATH); + for (Task task : list) { + writer.write(task.type + " | " + task.isDone + " | " + + task.description + " | " + task.date + System.lineSeparator()); + } + writer.close(); + System.out.println("Successfully saved to file!"); + } catch (IOException e){ + e.printStackTrace(); + } + } + public static void request() { Scanner in = new Scanner(System.in); String line; @@ -136,6 +206,9 @@ public static void request() { case "delete": Delete(line.substring(7)); break; + case "save": + Save(); + break; default: System.out.println("I don't know what that means"); break; diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 5be2875002..650be24214 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -1,11 +1,11 @@ public class Event extends Task { - public Event(String description, String deadline) { + public Event(String description, String date) { super(description); - this.deadline=deadline; + this.date=date; } @Override public String toString() { - return "[E]" + super.toString()+ "(" + this.deadline + ")"; + return "[E]" + super.toString()+ "(" + this.date + ")"; } } diff --git a/src/main/java/Task.java b/src/main/java/Task.java index 7b0ef2f5e8..d8828d87b9 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -1,7 +1,8 @@ public class Task { protected String description; + protected char type; protected boolean isDone; - protected String deadline; + protected String date; protected int listCount; @@ -9,14 +10,18 @@ public Task(String description) { this.description = description; this.isDone = false; this.listCount = 0; - this.deadline = " none"; + this.type = ' '; + this.date = " none"; } public String statusicon(){ + return (this.isDone?"[✓]":"[✗]"); } - public void markDone(){ - this.isDone = true; - } +// public void markDone(){ +// this.isDone = true; +// } + + @Override public String toString(){ return statusicon() + description; From 920830bde6d1189e0ced57c628145695122c7a31 Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Fri, 25 Sep 2020 18:22:04 +0800 Subject: [PATCH 08/10] Level 7. Save --- src/main/java/Duke.java | 39 ++++++++++++++++++------------ src/main/java/META-INF/MANIFEST.MF | 3 +++ src/main/java/Task.java | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 src/main/java/META-INF/MANIFEST.MF diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 48dc853556..a654a5523c 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -14,7 +14,8 @@ import java.io.FileWriter; public class Duke { - public static final String filePath = "duke.txt"; + public final static String FILE_DIR = "data"; + public final static String FILE_PATH = "data/data.txt"; public static int listCount = 0; public static ArrayList list = new ArrayList<>(); @@ -118,7 +119,9 @@ public static void greet(){ public static void fileLoad() throws IOException { - File dataFile = new File(filePath); + + + File dataFile = new File(FILE_PATH); if (dataFile.createNewFile()) { System.out.println("Since the file does not exist, I have created a file for you."); } @@ -126,27 +129,32 @@ public static void fileLoad() throws IOException { while (dataScanner.hasNext()) { String data = dataScanner.nextLine(); - String type = data.substring(0,1); - String info = data.substring(8); - int dateIndex = info.indexOf('|'); - switch(type){ + String info = data.substring(4); + int infoIndex = (info.indexOf("|") + 2); + int dateIndex = (info.substring(infoIndex)).indexOf("|")+infoIndex+2; + boolean done = info.substring(0, infoIndex-3).equals("true"); + + switch(data.substring(0,1)){ case "D": - Task newDeadline = new Deadline(info.substring(0, dateIndex), info.substring(dateIndex + info.length()-1)); + Task newDeadline = new Deadline(info.substring(infoIndex, dateIndex-3), info.substring(dateIndex)); newDeadline.type = 'D'; - newDeadline.isDone = data.charAt(4)=='1'; + newDeadline.isDone = done; list.add(newDeadline); + listCount++; break; case "T": - Task newTodo = new ToDo(info); + Task newTodo = new ToDo(info.substring(infoIndex)); newTodo.type = 'T'; - newTodo.isDone = data.charAt(4)=='1'; + newTodo.isDone = done; list.add(newTodo); + listCount++; break; case "E": - Task dateEvent = new Event(info.substring(0, dateIndex), info.substring(dateIndex + info.length()-1)); - dateEvent.type = 'D'; - dateEvent.isDone = data.charAt(4)=='1'; - list.add(dateEvent); + Task newEvent = new Event(info.substring(infoIndex, dateIndex-3), info.substring(dateIndex)); + newEvent.type = 'D'; + newEvent.isDone = done; + list.add(newEvent); + listCount++; break; default: break; @@ -155,8 +163,7 @@ public static void fileLoad() throws IOException { } public static void Save(){ - final String FILE_DIR = "data"; - final String FILE_PATH = "data/data.txt"; + FileWriter writer; File fileDir = new File(FILE_DIR); diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..d2ffd5b4d2 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Duke + diff --git a/src/main/java/Task.java b/src/main/java/Task.java index d8828d87b9..88aa5bb390 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -11,7 +11,7 @@ public Task(String description) { this.isDone = false; this.listCount = 0; this.type = ' '; - this.date = " none"; + this.date = " "; } public String statusicon(){ From 4602e80ee34e3df3bd7ed3d188c8ef26d3b7889c Mon Sep 17 00:00:00 2001 From: teachyourselfcoding Date: Fri, 25 Sep 2020 18:38:03 +0800 Subject: [PATCH 09/10] Level 9. Find --- src/main/java/Duke.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index a654a5523c..e173f4f28c 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -111,6 +111,17 @@ public static void Delete(String taskNumber){ System.out.println("Now you have: " + list.size() + " task(s) in your list!"); } + public static void Find (String description){ + int findCount = 0; + System.out.println(" Here are the matching tasks in your list: "); + for(int i =0; i Date: Fri, 2 Oct 2020 01:19:21 +0800 Subject: [PATCH 10/10] APush --- docs/README.md | 157 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 149 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index fd44069597..85e6208157 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,20 +1,161 @@ -# User Guide +# User Guide ## Features -### Feature 1 -Description of feature. +### 1. Add Todo +Add a todo task to your task list. + +### 2. Add Deadline +Add a deadline task to your task list with relevant time. + +### 3. Add Event +Add an event to your task list with relevant time. + +### 4. Mark task as Done +Mark a task in your task list as done. + +### 5. List all tasks +List out all tasks in your task list in order. + +### 6. Delete task +Delete a task from your task list. + +### 7. Find task +Find tasks containing any form of a keyword. + +### 8. Save task list +Save your task list to a .txt file. + +### 8. Save task list +Load your task list from a .txt file. + ## Usage -### `Keyword` - Describe action +### `todo ` - Add a Todo task + +Add a Todo task to your task list. + +Example of usage: + +`todo read book` + +Expected outcome: + +`____________________________________________________________ +Got it. I've added this task: ` +`[T][✗] read book` +`Now you have 1 tasks in the list.` +`____________________________________________________________` + +### `event /at ` - Add an Event + +Add an Event task to your task list with relevant time. + +Example of usage: + +`event meeting /10am` + +Expected outcome: + +`____________________________________________________________ +Got it. I've added this task: ` +`[E][✘] meeting (10am)` +`Now you have 2 tasks in the list.` +`____________________________________________________________` + +### `deadline /by ` - Add a Deadline + +Add a Deadline task to your task list. + +Example of usage: + +`deadline Assignment 2 /Monday 2359` + +Expected outcome: + +`____________________________________________________________ +Got it. I've added this task: ` +`[D][✗] Assignment 2 (Monday 2359)` +`Now you have 3 tasks in the list.` +`____________________________________________________________` + + + -Describe action and its outcome. -Example of usage: -`keyword (optional arguments)` +### `done ` - Mark task as done + +Mark a task in your task list as done. + +Example of usage: + +`done 1` + +Expected outcome: + +`____________________________________________________________ +Nice! I've marked this task as done: ` +`[[T][✓] read book` +`____________________________________________________________` + +### `list` - List all tasks + +List all tasks in your task list. + +Example of usage: + +`list` + +Expected outcome: + +`____________________________________________________________ +Here are the tasks in your list: ` +`1. [T][✓] read book` +`2. [E][✘] meeting (10am)` +`3. [D][✘] Assignment 2 (Monday 2359)` +`____________________________________________________________` + +### `delete ` - Delete a task + +Delete a task from your task list. + +Example of usage: + +`delete 1` Expected outcome: -`outcome` +`____________________________________________________________` +`Removed: [T][✓] read book` +`Now you have 2 task(s) in your list` +`____________________________________________________________` + +### `find ` - Find tasks + +Find tasks with matching keyword. + +Example of usage: + +`find read` + +Expected outcome: + + +`Here are the matching tasks in your list: ` +`1. [D][✘] Go through lecture readings (Tuesday before lecture)` +`2. [E][✘] Reading habit fair (Tuesday 10pm)` + +### `save` - Save task list + +Save task list to .txt file. + +Example of usage: + +`save` + +Expected outcome: + + `Successfully saved to file!` +