From 181bb4548204241005093990d71beea537b9b77d Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 18 Aug 2020 23:28:21 +0800 Subject: [PATCH 01/94] Level 0: Greet --- src/main/java/Duke.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5d313334..e0792098 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,4 @@ + public class Duke { public static void main(String[] args) { String logo = " ____ _ \n" @@ -6,5 +7,13 @@ public static void main(String[] args) { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); + printWelcome(); + showExit(); + } + public static void printWelcome() { + System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + } + public static void showExit() { + System.out.println("Bye. Hope to see you again soon!"); } } From ac1c162d2974e622d545e4b9e0584308b196d29c Mon Sep 17 00:00:00 2001 From: linqing42 Date: Thu, 20 Aug 2020 22:27:54 +0800 Subject: [PATCH 02/94] Level-1: Greet, Echo, Exit --- src/main/java/Duke.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index e0792098..139c8066 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,4 @@ +import java.util.Scanner; public class Duke { public static void main(String[] args) { @@ -8,12 +9,25 @@ public static void main(String[] args) { + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); printWelcome(); + //Declare the object and initialize with + //predefined standard input object + Scanner in = new Scanner(System.in); + + //String input + String input = in. nextLine(); + + while(!input.equals("bye")){ + System.out.println(" " + input); + input =in.nextLine(); + } + showExit(); } public static void printWelcome() { System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); } public static void showExit() { - System.out.println("Bye. Hope to see you again soon!"); + System.out.println(" Bye. Hope to see you again soon!"); } + } From ecacac849ac657bce22dbcc3dd4a1f6867cb4fa8 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 21 Aug 2020 00:05:39 +0800 Subject: [PATCH 03/94] Level 2. Add, List(Add the ability to store whatever text entered by the user and display them back to the user when requested.) --- src/main/java/Duke.java | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 139c8066..daab41bc 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,4 +1,5 @@ import java.util.Scanner; +import java.util.ArrayList; public class Duke { public static void main(String[] args) { @@ -14,13 +15,22 @@ public static void main(String[] args) { Scanner in = new Scanner(System.in); //String input - String input = in. nextLine(); + String input = in.nextLine(); + ArrayList tasks = new ArrayList<>(); - while(!input.equals("bye")){ - System.out.println(" " + input); - input =in.nextLine(); - } + while (!input.equals("bye")) { + if (!input.equals("list")) { + tasks.add(input); + System.out.println(" added: " + input); + } else { + for (int i = 0; i < tasks.size(); i++) { + System.out.println(" " + (i + 1)+ ". "+ tasks.get(i)); + } + } + in = new Scanner(System.in); + input = in.nextLine(); + } showExit(); } public static void printWelcome() { @@ -30,4 +40,6 @@ public static void showExit() { System.out.println(" Bye. Hope to see you again soon!"); } -} + } + + From e1cfbf991e7a90a03b708ecc26e534a4f3c615df Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 21 Aug 2020 00:22:38 +0800 Subject: [PATCH 04/94] case for list is empty --- src/main/java/Duke.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index daab41bc..e8f93272 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -22,10 +22,13 @@ public static void main(String[] args) { if (!input.equals("list")) { tasks.add(input); System.out.println(" added: " + input); - } else { + } else{ for (int i = 0; i < tasks.size(); i++) { System.out.println(" " + (i + 1)+ ". "+ tasks.get(i)); } + if(tasks.size() == 0){ + System.out.println(" Your list is empty"); + } } in = new Scanner(System.in); input = in.nextLine(); From f5608da7b457487ee05ab18a257d79532071f671 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 23 Aug 2020 22:37:23 +0800 Subject: [PATCH 05/94] mark as done --- src/main/java/Duke.java | 37 ++++++++++++++++++++++++++----------- src/main/java/Task.java | 28 ++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 src/main/java/Task.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index e8f93272..0a46a0b9 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -2,6 +2,7 @@ import java.util.ArrayList; public class Duke { + private static ArrayList tasks = new ArrayList<>(100); public static void main(String[] args) { String logo = " ____ _ \n" + "| _ \\ _ _| | _____ \n" @@ -16,21 +17,26 @@ public static void main(String[] args) { //String input String input = in.nextLine(); - ArrayList tasks = new ArrayList<>(); - while (!input.equals("bye")) { - if (!input.equals("list")) { - tasks.add(input); - System.out.println(" added: " + input); - } else{ + while (!input.isEmpty()) { + if (input.equals("bye")){ + break; + }else if (input.equals("list")) { + System.out.println(" ____________________________________________________________\n" + + " Here are the tasks in your list:"); for (int i = 0; i < tasks.size(); i++) { - System.out.println(" " + (i + 1)+ ". "+ tasks.get(i)); - } - if(tasks.size() == 0){ - System.out.println(" Your list is empty"); + System.out.println(" " + (i + 1) + ". " + tasks.get(i)); } + + } else if (input.contains("done")) { + String listActionIndex = (input.split(" "))[1]; + int arrayIndex = Integer.parseInt(listActionIndex) - 1; + markAsDone(arrayIndex); + }else{ + tasks.add(new Task(input)); + System.out.println(" added: " + input); + } - in = new Scanner(System.in); input = in.nextLine(); } @@ -43,6 +49,15 @@ public static void showExit() { System.out.println(" Bye. Hope to see you again soon!"); } + public static void markAsDone(int arrayIndex){ + Task task = tasks.get(arrayIndex); + task.setDone(); + System.out.println(" ____________________________________________________________\n" + + " Nice! I've marked this task as done:\n" + + task + "\n" + + " ____________________________________________________________\n"); } +} + diff --git a/src/main/java/Task.java b/src/main/java/Task.java new file mode 100644 index 00000000..7abe5db2 --- /dev/null +++ b/src/main/java/Task.java @@ -0,0 +1,28 @@ +import java.util.ArrayList; + +public class Task { + protected String description; + protected boolean isDone; + + public Task(String description) { + this.description = description; + this.isDone = false; + } + + + public String getStatusIcon() { + return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols + } + public void setDone(){ + this.isDone = true; + } + + + + @Override + public String toString() { + return "[" + getStatusIcon() + "] " + description; + } + +} + From 10381c73a5a18107c83df69e443c6e229a7039cd Mon Sep 17 00:00:00 2001 From: linqing42 Date: Wed, 26 Aug 2020 00:09:51 +0800 Subject: [PATCH 06/94] add todo,event and deadline --- src/main/java/Deadline.java | 13 ++++++++ src/main/java/Duke.java | 62 ++++++++++++++++++++++++++++--------- src/main/java/Event.java | 14 +++++++++ src/main/java/ToDo.java | 12 +++++++ 4 files changed, 87 insertions(+), 14 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 00000000..9ebde184 --- /dev/null +++ b/src/main/java/Deadline.java @@ -0,0 +1,13 @@ +public class Deadline extends Task { + protected String by; + + public Deadline(String description, String by) { + super(description); + this.by = by; + } + + @Override + public String toString() { + return "[D]" + super.toString() + "(by:" + by + ")"; + } +} \ No newline at end of file diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 0a46a0b9..c2d76fe6 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -2,7 +2,8 @@ import java.util.ArrayList; public class Duke { - private static ArrayList tasks = new ArrayList<>(100); + private static ArrayList tasks = new ArrayList<>(100); + public static void main(String[] args) { String logo = " ____ _ \n" + "| _ \\ _ _| | _____ \n" @@ -11,45 +12,79 @@ public static void main(String[] args) { + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); printWelcome(); - //Declare the object and initialize with - //predefined standard input object - Scanner in = new Scanner(System.in); + //Declare the object and initialize with + //predefined standard input object + Scanner in = new Scanner(System.in); //String input String input = in.nextLine(); while (!input.isEmpty()) { - if (input.equals("bye")){ + if (input.equals("bye")) { break; - }else if (input.equals("list")) { - System.out.println(" ____________________________________________________________\n" + } else if (input.equals("list")) { + System.out.println(" ___________________________________________________________________\n" + " Here are the tasks in your list:"); for (int i = 0; i < tasks.size(); i++) { - System.out.println(" " + (i + 1) + ". " + tasks.get(i)); + System.out.println(" " + (i + 1) + "." + tasks.get(i)); } - } else if (input.contains("done")) { + } else if (input.startsWith("done")) { String listActionIndex = (input.split(" "))[1]; int arrayIndex = Integer.parseInt(listActionIndex) - 1; markAsDone(arrayIndex); - }else{ - tasks.add(new Task(input)); - System.out.println(" added: " + input); + } else if (input.startsWith("todo")){ + Task todo = new ToDo(input.substring(5)); + tasks.add(todo); + System.out.println("Got it, I've added the following task:\n" + " " + todo + "\n" + + "Now you have " + tasks.size() + " tasks in the list."); + + } else if(input.startsWith("deadline")){ + String[] splitDetail = input.split("/by" ); + String task = splitDetail[0]; + String date = splitDetail[1]; + Task detail = new Deadline (task, date); + tasks.add(detail); + System.out.println("Got it. I've added this task:\n" + + " " + + detail + + "\n" + + "Now you have " + tasks.size() +" tasks in the list."); + + } else if(input.startsWith("event")){ + String[] splitEvent = input.split("/at" ); + String event = splitEvent[0]; + String time = splitEvent[1]; + Task detail = new Event(event, time); + tasks.add(detail); + System.out.println("Got it. I've added this task:\n" + + " " + + detail + + "\n" + + "Now you have " + tasks.size() +" tasks in the list."); } + else { + tasks.add(new Task(input)); + System.out.println(" added: " + input); + + } + input = in.nextLine(); } showExit(); } + public static void printWelcome() { System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); } + public static void showExit() { System.out.println(" Bye. Hope to see you again soon!"); } - public static void markAsDone(int arrayIndex){ + public static void markAsDone(int arrayIndex) { Task task = tasks.get(arrayIndex); task.setDone(); System.out.println(" ____________________________________________________________\n" @@ -58,6 +93,5 @@ public static void markAsDone(int arrayIndex){ + " ____________________________________________________________\n"); } - } diff --git a/src/main/java/Event.java b/src/main/java/Event.java new file mode 100644 index 00000000..cd2c743e --- /dev/null +++ b/src/main/java/Event.java @@ -0,0 +1,14 @@ +public class Event extends Task{ + protected String at; + + public Event(String description, String at) { + super(description); + this.at = at; + } + + @Override + public String toString() { + return "[E]" + super.toString() + "(at:" + at + ")"; + } +} + diff --git a/src/main/java/ToDo.java b/src/main/java/ToDo.java new file mode 100644 index 00000000..042f00ec --- /dev/null +++ b/src/main/java/ToDo.java @@ -0,0 +1,12 @@ +public class ToDo extends Task{ + + public ToDo(String description){ + super(description); + } + + + @Override + public String toString() { + return "[T]" + super.toString(); + } +} From f1b0775c8b0843030c90c00fed37a6d32fa81d3a Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 28 Aug 2020 00:07:38 +0800 Subject: [PATCH 07/94] uing .bat --- src/main/java/Duke.java | 24 ++++++++++-------------- text-ui-test/EXPECTED.TXT | 28 ++++++++++++++++++++++++++++ text-ui-test/input.txt | 6 ++++++ text-ui-test/runtest.bat | 2 +- text-ui-test/runtest.sh | 38 -------------------------------------- 5 files changed, 45 insertions(+), 53 deletions(-) delete mode 100644 text-ui-test/runtest.sh diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index c2d76fe6..6e35ced9 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -37,7 +37,8 @@ public static void main(String[] args) { Task todo = new ToDo(input.substring(5)); tasks.add(todo); System.out.println("Got it, I've added the following task:\n" + " " + todo + "\n" - + "Now you have " + tasks.size() + " tasks in the list."); + + "Now you have " + tasks.size() + " tasks in the list.\n" + +"___________________________________________________________________\n"); } else if(input.startsWith("deadline")){ String[] splitDetail = input.split("/by" ); @@ -49,26 +50,22 @@ public static void main(String[] args) { + " " + detail + "\n" - + "Now you have " + tasks.size() +" tasks in the list."); + + "Now you have " + tasks.size() +" tasks in the list.\n"+"___________________________________________________________________\n"); } else if(input.startsWith("event")){ String[] splitEvent = input.split("/at" ); String event = splitEvent[0]; String time = splitEvent[1]; - Task detail = new Event(event, time); - tasks.add(detail); + Task details = new Event(event, time); + tasks.add(details); System.out.println("Got it. I've added this task:\n" + " " - + detail + + details + "\n" - + "Now you have " + tasks.size() +" tasks in the list."); + + "Now you have " + tasks.size() +" tasks in the list.\n" + +"___________________________________________________________________\n"); } - else { - tasks.add(new Task(input)); - System.out.println(" added: " + input); - - } input = in.nextLine(); @@ -87,10 +84,9 @@ public static void showExit() { public static void markAsDone(int arrayIndex) { Task task = tasks.get(arrayIndex); task.setDone(); - System.out.println(" ____________________________________________________________\n" - + " Nice! I've marked this task as done:\n" + System.out.println(" Nice! I've marked this task as done:\n" + task + "\n" - + " ____________________________________________________________\n"); + + "___________________________________________________________________\n"); } } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 657e74f6..c463308d 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -5,3 +5,31 @@ Hello from | |_| | |_| | < __/ |____/ \__,_|_|\_\___| +Hello! I'm Duke +What can I do for you? + +Got it, I've added the following task: + [T][✘] borrow book +Now you have 1 tasks in the list. +___________________________________________________________________ + +Got it. I've added this task: + [D][✘] deadline return book (by: Sunday) +Now you have 2 tasks in the list. +___________________________________________________________________ + +Got it. I've added this task: + [E][✘] event project meeting (at: Mon 2-4pm) +Now you have 3 tasks in the list. +___________________________________________________________________ + + Nice! I've marked this task as done: +[D][✓] deadline return book (by: Sunday) +___________________________________________________________________ + + ___________________________________________________________________ + Here are the tasks in your list: + 1.[T][✘] borrow book + 2.[D][✓] deadline return book (by: Sunday) + 3.[E][✘] event project meeting (at: Mon 2-4pm) + Bye. Hope to see you again soon! diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index e69de29b..49a12133 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -0,0 +1,6 @@ +todo borrow book +deadline return book /by Sunday +event project meeting /at Mon 2-4pm +done 2 +list +bye \ No newline at end of file diff --git a/text-ui-test/runtest.bat b/text-ui-test/runtest.bat index d0facc63..01cef5bf 100644 --- a/text-ui-test/runtest.bat +++ b/text-ui-test/runtest.bat @@ -7,7 +7,7 @@ REM delete output from previous run del ACTUAL.TXT REM compile the code into the bin folder -javac -cp ..\src -Xlint:none -d ..\bin ..\src\main\java\Duke.java +javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\Duke.java IF ERRORLEVEL 1 ( echo ********** BUILD FAILURE ********** exit /b 1 diff --git a/text-ui-test/runtest.sh b/text-ui-test/runtest.sh deleted file mode 100644 index e169618a..00000000 --- a/text-ui-test/runtest.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -# create bin directory if it doesn't exist -if [ ! -d "../bin" ] -then - mkdir ../bin -fi - -# delete output from previous run -if [ -e "./ACTUAL.TXT" ] -then - rm ACTUAL.TXT -fi - -# compile the code into the bin folder, terminates if error occurred -if ! javac -cp ../src -Xlint:none -d ../bin ../src/main/java/Duke.java -then - echo "********** BUILD FAILURE **********" - exit 1 -fi - -# run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT -java -classpath ../bin Duke < input.txt > ACTUAL.TXT - -# convert to UNIX format -cp EXPECTED.TXT EXPECTED-UNIX.TXT -dos2unix ACTUAL.TXT EXPECTED-UNIX.TXT - -# compare the output to the expected output -diff ACTUAL.TXT EXPECTED-UNIX.TXT -if [ $? -eq 0 ] -then - echo "Test result: PASSED" - exit 0 -else - echo "Test result: FAILED" - exit 1 -fi \ No newline at end of file From eb14988a5408852a3f40ecac4d57a1d72c656a8b Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 28 Aug 2020 00:15:02 +0800 Subject: [PATCH 08/94] uing .bat --- text-ui-test/EXPECTED.TXT | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index c463308d..3d71ebee 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -9,27 +9,27 @@ Hello! I'm Duke What can I do for you? Got it, I've added the following task: - [T][✘] borrow book + [T][?] borrow book Now you have 1 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [D][✘] deadline return book (by: Sunday) + [D][?] deadline return book (by: Sunday) Now you have 2 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [E][✘] event project meeting (at: Mon 2-4pm) + [E][?] event project meeting (at: Mon 2-4pm) Now you have 3 tasks in the list. ___________________________________________________________________ Nice! I've marked this task as done: -[D][✓] deadline return book (by: Sunday) +[D][?] deadline return book (by: Sunday) ___________________________________________________________________ ___________________________________________________________________ Here are the tasks in your list: - 1.[T][✘] borrow book - 2.[D][✓] deadline return book (by: Sunday) - 3.[E][✘] event project meeting (at: Mon 2-4pm) + 1.[T][?] borrow book + 2.[D][?] deadline return book (by: Sunday) + 3.[E][?] event project meeting (at: Mon 2-4pm) Bye. Hope to see you again soon! From 42ac17b0108eb8ee140f50bcd477bb916c53d85a Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 28 Aug 2020 00:16:19 +0800 Subject: [PATCH 09/94] Revert "uing .bat" This reverts commit eb14988a5408852a3f40ecac4d57a1d72c656a8b. --- text-ui-test/EXPECTED.TXT | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 3d71ebee..c463308d 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -9,27 +9,27 @@ Hello! I'm Duke What can I do for you? Got it, I've added the following task: - [T][?] borrow book + [T][✘] borrow book Now you have 1 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [D][?] deadline return book (by: Sunday) + [D][✘] deadline return book (by: Sunday) Now you have 2 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [E][?] event project meeting (at: Mon 2-4pm) + [E][✘] event project meeting (at: Mon 2-4pm) Now you have 3 tasks in the list. ___________________________________________________________________ Nice! I've marked this task as done: -[D][?] deadline return book (by: Sunday) +[D][✓] deadline return book (by: Sunday) ___________________________________________________________________ ___________________________________________________________________ Here are the tasks in your list: - 1.[T][?] borrow book - 2.[D][?] deadline return book (by: Sunday) - 3.[E][?] event project meeting (at: Mon 2-4pm) + 1.[T][✘] borrow book + 2.[D][✓] deadline return book (by: Sunday) + 3.[E][✘] event project meeting (at: Mon 2-4pm) Bye. Hope to see you again soon! From 68552582bb841edb86858b5afe610378d0b972d4 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 28 Aug 2020 00:18:04 +0800 Subject: [PATCH 10/94] update text-ui-test --- text-ui-test/EXPECTED.TXT | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index c463308d..3d71ebee 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -9,27 +9,27 @@ Hello! I'm Duke What can I do for you? Got it, I've added the following task: - [T][✘] borrow book + [T][?] borrow book Now you have 1 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [D][✘] deadline return book (by: Sunday) + [D][?] deadline return book (by: Sunday) Now you have 2 tasks in the list. ___________________________________________________________________ Got it. I've added this task: - [E][✘] event project meeting (at: Mon 2-4pm) + [E][?] event project meeting (at: Mon 2-4pm) Now you have 3 tasks in the list. ___________________________________________________________________ Nice! I've marked this task as done: -[D][✓] deadline return book (by: Sunday) +[D][?] deadline return book (by: Sunday) ___________________________________________________________________ ___________________________________________________________________ Here are the tasks in your list: - 1.[T][✘] borrow book - 2.[D][✓] deadline return book (by: Sunday) - 3.[E][✘] event project meeting (at: Mon 2-4pm) + 1.[T][?] borrow book + 2.[D][?] deadline return book (by: Sunday) + 3.[E][?] event project meeting (at: Mon 2-4pm) Bye. Hope to see you again soon! From d06c11bfac45c95395ff56e8ebfb5bd41900d4c2 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 28 Aug 2020 20:22:54 +0800 Subject: [PATCH 11/94] coding standard --- src/main/java/Duke.java | 53 ++++++++++++++++++++--------------------- src/main/java/Task.java | 7 +----- src/main/java/ToDo.java | 3 +-- 3 files changed, 28 insertions(+), 35 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 6e35ced9..ccfbd46a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -12,48 +12,49 @@ public static void main(String[] args) { + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); printWelcome(); - - //Declare the object and initialize with - //predefined standard input object + //Declare the object and initialize with Scanner in = new Scanner(System.in); //String input String input = in.nextLine(); while (!input.isEmpty()) { - if (input.equals("bye")) { + if (input.startsWith("bye")) { break; - } else if (input.equals("list")) { + } else if (input.startsWith("list")) { System.out.println(" ___________________________________________________________________\n" + " Here are the tasks in your list:"); for (int i = 0; i < tasks.size(); i++) { System.out.println(" " + (i + 1) + "." + tasks.get(i)); } - } else if (input.startsWith("done")) { String listActionIndex = (input.split(" "))[1]; int arrayIndex = Integer.parseInt(listActionIndex) - 1; markAsDone(arrayIndex); - } else if (input.startsWith("todo")){ - Task todo = new ToDo(input.substring(5)); - tasks.add(todo); - System.out.println("Got it, I've added the following task:\n" + " " + todo + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - +"___________________________________________________________________\n"); - - } else if(input.startsWith("deadline")){ - String[] splitDetail = input.split("/by" ); + } else if (input.startsWith("todo")) { + Task ignoreWord = new ToDo(input.substring(5)); + tasks.add(ignoreWord); + System.out.println("Got it, I've added the following task:\n" + + " " + + ignoreWord + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } else if (input.startsWith("deadline")) { + String[] splitDetail = input.split("/by"); String task = splitDetail[0]; String date = splitDetail[1]; - Task detail = new Deadline (task, date); + Task detail = new Deadline(task, date); tasks.add(detail); System.out.println("Got it. I've added this task:\n" + " " + detail + "\n" - + "Now you have " + tasks.size() +" tasks in the list.\n"+"___________________________________________________________________\n"); - - } else if(input.startsWith("event")){ - String[] splitEvent = input.split("/at" ); + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } else if (input.startsWith("event")) { + String[] splitEvent = input.split("/at"); String event = splitEvent[0]; String time = splitEvent[1]; Task details = new Event(event, time); @@ -62,13 +63,10 @@ public static void main(String[] args) { + " " + details + "\n" - + "Now you have " + tasks.size() +" tasks in the list.\n" - +"___________________________________________________________________\n"); - + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); } - input = in.nextLine(); - } showExit(); } @@ -85,9 +83,10 @@ public static void markAsDone(int arrayIndex) { Task task = tasks.get(arrayIndex); task.setDone(); System.out.println(" Nice! I've marked this task as done:\n" - + task + "\n" + + task + + "\n" + "___________________________________________________________________\n"); } - } + diff --git a/src/main/java/Task.java b/src/main/java/Task.java index 7abe5db2..45b95e2a 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -1,5 +1,3 @@ -import java.util.ArrayList; - public class Task { protected String description; protected boolean isDone; @@ -9,20 +7,17 @@ public Task(String description) { this.isDone = false; } - public String getStatusIcon() { return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols } + public void setDone(){ this.isDone = true; } - - @Override public String toString() { return "[" + getStatusIcon() + "] " + description; } - } diff --git a/src/main/java/ToDo.java b/src/main/java/ToDo.java index 042f00ec..10b7eb5e 100644 --- a/src/main/java/ToDo.java +++ b/src/main/java/ToDo.java @@ -4,9 +4,8 @@ public ToDo(String description){ super(description); } - @Override public String toString() { - return "[T]" + super.toString(); + return "[T]" + super.toString(); } } From 684ae3a7797c16b5fc2ade1ac13081e9d554cd78 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 30 Aug 2020 22:52:50 +0800 Subject: [PATCH 12/94] handle for todo case --- src/main/java/Duke.java | 114 +++++++++++------------- src/main/java/{ => Tasks}/Deadline.java | 4 +- src/main/java/{ => Tasks}/Event.java | 4 +- src/main/java/{ => Tasks}/Task.java | 13 +++ src/main/java/{ => Tasks}/ToDo.java | 4 +- src/main/java/Ui.java | 27 ++++++ 6 files changed, 102 insertions(+), 64 deletions(-) rename src/main/java/{ => Tasks}/Deadline.java (82%) rename src/main/java/{ => Tasks}/Event.java (83%) rename src/main/java/{ => Tasks}/Task.java (53%) rename src/main/java/{ => Tasks}/ToDo.java (77%) create mode 100644 src/main/java/Ui.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index ccfbd46a..825bb255 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,24 +1,28 @@ +import Tasks.Deadline; +import Tasks.Event; +import Tasks.Task; +import Tasks.ToDo; + import java.util.Scanner; import java.util.ArrayList; public class Duke { private static ArrayList tasks = new ArrayList<>(100); + private static Ui ui; public static void main(String[] args) { - String logo = " ____ _ \n" - + "| _ \\ _ _| | _____ \n" - + "| | | | | | | |/ / _ \\\n" - + "| |_| | |_| | < __/\n" - + "|____/ \\__,_|_|\\_\\___|\n"; - System.out.println("Hello from\n" + logo); - printWelcome(); + ui.printWelcome(); + run(); + } + + public static void run() { //Declare the object and initialize with Scanner in = new Scanner(System.in); //String input String input = in.nextLine(); - while (!input.isEmpty()) { if (input.startsWith("bye")) { + ui.showExit(); break; } else if (input.startsWith("list")) { System.out.println(" ___________________________________________________________________\n" @@ -29,64 +33,52 @@ public static void main(String[] args) { } else if (input.startsWith("done")) { String listActionIndex = (input.split(" "))[1]; int arrayIndex = Integer.parseInt(listActionIndex) - 1; - markAsDone(arrayIndex); + Task.markAsDone(arrayIndex); } else if (input.startsWith("todo")) { - Task ignoreWord = new ToDo(input.substring(5)); - tasks.add(ignoreWord); - System.out.println("Got it, I've added the following task:\n" - + " " - + ignoreWord - + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } else if (input.startsWith("deadline")) { - String[] splitDetail = input.split("/by"); - String task = splitDetail[0]; - String date = splitDetail[1]; - Task detail = new Deadline(task, date); - tasks.add(detail); - System.out.println("Got it. I've added this task:\n" - + " " - + detail - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } else if (input.startsWith("event")) { - String[] splitEvent = input.split("/at"); - String event = splitEvent[0]; - String time = splitEvent[1]; - Task details = new Event(event, time); - tasks.add(details); - System.out.println("Got it. I've added this task:\n" - + " " - + details - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); + if (input.length() < 6) { + System.out.println("☹ OOPS!!! The description of a todo cannot be empty."); + } else { + Task ignoreWord = new ToDo(input.substring(5)); + tasks.add(ignoreWord); + System.out.println("Got it, I've added the following task:\n" + + " " + + ignoreWord + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } + }else if (input.startsWith("deadline")) { + String[] splitDetail = input.split("/by"); + String task = splitDetail[0]; + String date = splitDetail[1]; + Task detail = new Deadline(task, date); + tasks.add(detail); + System.out.println("Got it. I've added this task:\n" + + " " + + detail + + "\n" + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } else if (input.startsWith("event")) { + String[] splitEvent = input.split("/at"); + String event = splitEvent[0]; + String time = splitEvent[1]; + Task details = new Event(event, time); + tasks.add(details); + System.out.println("Got it. I've added this task:\n" + + " " + + details + + "\n" + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } + input = in.nextLine(); } - input = in.nextLine(); } - showExit(); } - public static void printWelcome() { - System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); - } - public static void showExit() { - System.out.println(" Bye. Hope to see you again soon!"); - } - - public static void markAsDone(int arrayIndex) { - Task task = tasks.get(arrayIndex); - task.setDone(); - System.out.println(" Nice! I've marked this task as done:\n" - + task - + "\n" - + "___________________________________________________________________\n"); - } -} diff --git a/src/main/java/Deadline.java b/src/main/java/Tasks/Deadline.java similarity index 82% rename from src/main/java/Deadline.java rename to src/main/java/Tasks/Deadline.java index 9ebde184..474101aa 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Tasks/Deadline.java @@ -1,4 +1,6 @@ -public class Deadline extends Task { +package Tasks; + +public class Deadline extends Task { protected String by; public Deadline(String description, String by) { diff --git a/src/main/java/Event.java b/src/main/java/Tasks/Event.java similarity index 83% rename from src/main/java/Event.java rename to src/main/java/Tasks/Event.java index cd2c743e..593dc80e 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Tasks/Event.java @@ -1,4 +1,6 @@ -public class Event extends Task{ +package Tasks; + +public class Event extends Task { protected String at; public Event(String description, String at) { diff --git a/src/main/java/Task.java b/src/main/java/Tasks/Task.java similarity index 53% rename from src/main/java/Task.java rename to src/main/java/Tasks/Task.java index 45b95e2a..8c2f6c53 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Tasks/Task.java @@ -1,3 +1,7 @@ +package Tasks; + +import java.util.ArrayList; + public class Task { protected String description; protected boolean isDone; @@ -14,6 +18,15 @@ public String getStatusIcon() { public void setDone(){ this.isDone = true; } + public static void markAsDone(int arrayIndex) { + ArrayList tasks = new ArrayList<>(); + Task task = tasks.get(arrayIndex); + task.setDone(); + System.out.println(" Nice! I've marked this task as done:\n" + + task + + "\n" + + "___________________________________________________________________\n"); + } @Override public String toString() { diff --git a/src/main/java/ToDo.java b/src/main/java/Tasks/ToDo.java similarity index 77% rename from src/main/java/ToDo.java rename to src/main/java/Tasks/ToDo.java index 10b7eb5e..10fd61e6 100644 --- a/src/main/java/ToDo.java +++ b/src/main/java/Tasks/ToDo.java @@ -1,4 +1,6 @@ -public class ToDo extends Task{ +package Tasks; + +public class ToDo extends Task { public ToDo(String description){ super(description); diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java new file mode 100644 index 00000000..bf1253a8 --- /dev/null +++ b/src/main/java/Ui.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +public class Ui { + public Scanner in = new Scanner(System.in); + + public Ui() { + } + + public String getInput() { + return in.nextLine(); + } + + + public static void printWelcome() { + String logo = " ____ _ \n" + + "| _ \\ _ _| | _____ \n" + + "| | | | | | | |/ / _ \\\n" + + "| |_| | |_| | < __/\n" + + "|____/ \\__,_|_|\\_\\___|\n"; + System.out.println("Hello from\n" + logo); + System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + } + + public static void showExit() { + System.out.println(" Bye. Hope to see you again soon!"); + } +} From fe434fa558b9e2f4128795b32387f5d04c4cbdff Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 31 Aug 2020 00:54:07 +0800 Subject: [PATCH 13/94] handle some error cases --- src/main/java/Duke.java | 116 +++++++++++++++++-------------- src/main/java/DukeException.java | 5 ++ 2 files changed, 68 insertions(+), 53 deletions(-) create mode 100644 src/main/java/DukeException.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 825bb255..4d57c8b0 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -15,66 +15,76 @@ public static void main(String[] args) { run(); } - public static void run() { + public static void run() { //Declare the object and initialize with Scanner in = new Scanner(System.in); //String input String input = in.nextLine(); while (!input.isEmpty()) { - if (input.startsWith("bye")) { - ui.showExit(); - break; - } else if (input.startsWith("list")) { - System.out.println(" ___________________________________________________________________\n" - + " Here are the tasks in your list:"); - for (int i = 0; i < tasks.size(); i++) { - System.out.println(" " + (i + 1) + "." + tasks.get(i)); - } - } else if (input.startsWith("done")) { - String listActionIndex = (input.split(" "))[1]; - int arrayIndex = Integer.parseInt(listActionIndex) - 1; - Task.markAsDone(arrayIndex); - } else if (input.startsWith("todo")) { - if (input.length() < 6) { - System.out.println("☹ OOPS!!! The description of a todo cannot be empty."); - } else { - Task ignoreWord = new ToDo(input.substring(5)); - tasks.add(ignoreWord); - System.out.println("Got it, I've added the following task:\n" - + " " - + ignoreWord - + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } - }else if (input.startsWith("deadline")) { - String[] splitDetail = input.split("/by"); - String task = splitDetail[0]; - String date = splitDetail[1]; - Task detail = new Deadline(task, date); - tasks.add(detail); - System.out.println("Got it. I've added this task:\n" - + " " - + detail - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); + if (input.startsWith("bye")) { + ui.showExit(); + break; + } else if (input.startsWith("list")) { + System.out.println(" ___________________________________________________________________\n" + + " Here are the tasks in your list:"); + for (int i = 0; i < tasks.size(); i++) { + System.out.println(" " + (i + 1) + "." + tasks.get(i)); + } + } else if (input.startsWith("done")) { + String listActionIndex = (input.split(" "))[1]; + int arrayIndex = Integer.parseInt(listActionIndex) - 1; + Task.markAsDone(arrayIndex); + } else if (input.startsWith("todo")) { + if (input.length() < 6) { + System.out.println("☹ OOPS!!! The description of a todo cannot be empty."); + } else { + Task ignoreWord = new ToDo(input.substring(5)); + tasks.add(ignoreWord); + System.out.println("Got it, I've added the following task:\n" + + " " + + ignoreWord + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } + } else if (input.startsWith("deadline")) { + if (input.length() < 10) { + System.out.println("☹ OOPS!!! The description of a deadline cannot be empty."); + } else { + String[] splitDetail = input.split("/by"); + String task = splitDetail[0]; + String date = splitDetail[1]; + Task detail = new Deadline(task, date); + tasks.add(detail); + System.out.println("Got it. I've added this task:\n" + + " " + + detail + + "\n" + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } } else if (input.startsWith("event")) { - String[] splitEvent = input.split("/at"); - String event = splitEvent[0]; - String time = splitEvent[1]; - Task details = new Event(event, time); - tasks.add(details); - System.out.println("Got it. I've added this task:\n" - + " " - + details - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); + if (input.length() < 7) { + System.out.println("☹ OOPS!!! The description of a event cannot be empty."); + } else { + String[] splitEvent = input.split("/at"); + String event = splitEvent[0]; + String time = splitEvent[1]; + Task details = new Event(event, time); + tasks.add(details); + System.out.println("Got it. I've added this task:\n" + + " " + + details + + "\n" + + "Now you have " + tasks.size() + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } + } else { + System.out.println("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); } - input = in.nextLine(); + input = in.nextLine(); } } } diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java new file mode 100644 index 00000000..df16adca --- /dev/null +++ b/src/main/java/DukeException.java @@ -0,0 +1,5 @@ +/*public class DukeException extends Exception { + public DukeException(String message) { + super(message); + } + }*/ \ No newline at end of file From 338e3128815ea7d15e63e695d11554ec90cbf71b Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 4 Sep 2020 01:35:48 +0800 Subject: [PATCH 14/94] improve code quality with some handle error edit --- README.md | 4 +- src/main/java/Duke.java | 94 ------------------- src/main/java/{Tasks => Dukes}/Deadline.java | 2 +- src/main/java/Dukes/Duke.java | 98 ++++++++++++++++++++ src/main/java/{ => Dukes}/DukeException.java | 6 +- src/main/java/{Tasks => Dukes}/Event.java | 2 +- src/main/java/{Tasks => Dukes}/Task.java | 30 ++++-- src/main/java/{Tasks => Dukes}/ToDo.java | 4 +- src/main/java/{ => Dukes}/Ui.java | 2 + text-ui-test/EXPECTED.TXT | 2 +- 10 files changed, 136 insertions(+), 108 deletions(-) delete mode 100644 src/main/java/Duke.java rename src/main/java/{Tasks => Dukes}/Deadline.java (95%) create mode 100644 src/main/java/Dukes/Duke.java rename src/main/java/{ => Dukes}/DukeException.java (55%) rename src/main/java/{Tasks => Dukes}/Event.java (94%) rename src/main/java/{Tasks => Dukes}/Task.java (54%) rename src/main/java/{Tasks => Dukes}/ToDo.java (85%) rename src/main/java/{ => Dukes}/Ui.java (97%) diff --git a/README.md b/README.md index 9d95025b..f9ba907e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Duke project template +# Dukes.Duke project template This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. @@ -15,7 +15,7 @@ Prerequisites: JDK 11, update Intellij to the most recent version. 1. Click `Open or Import`. 1. Select the project directory, and click `OK` 1. If there are any further prompts, accept the defaults. -1. After the importing is complete, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below: +1. After the importing is complete, locate the `src/main/java/Dukes.Duke.java` file, right-click it, and choose `Run Dukes.Duke.main()`. If the setup is correct, you should see something like the below: ``` Hello from ____ _ diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java deleted file mode 100644 index 4d57c8b0..00000000 --- a/src/main/java/Duke.java +++ /dev/null @@ -1,94 +0,0 @@ -import Tasks.Deadline; -import Tasks.Event; -import Tasks.Task; -import Tasks.ToDo; - -import java.util.Scanner; -import java.util.ArrayList; - -public class Duke { - private static ArrayList tasks = new ArrayList<>(100); - private static Ui ui; - - public static void main(String[] args) { - ui.printWelcome(); - run(); - } - - public static void run() { - //Declare the object and initialize with - Scanner in = new Scanner(System.in); - //String input - String input = in.nextLine(); - while (!input.isEmpty()) { - if (input.startsWith("bye")) { - ui.showExit(); - break; - } else if (input.startsWith("list")) { - System.out.println(" ___________________________________________________________________\n" - + " Here are the tasks in your list:"); - for (int i = 0; i < tasks.size(); i++) { - System.out.println(" " + (i + 1) + "." + tasks.get(i)); - } - } else if (input.startsWith("done")) { - String listActionIndex = (input.split(" "))[1]; - int arrayIndex = Integer.parseInt(listActionIndex) - 1; - Task.markAsDone(arrayIndex); - } else if (input.startsWith("todo")) { - if (input.length() < 6) { - System.out.println("☹ OOPS!!! The description of a todo cannot be empty."); - } else { - Task ignoreWord = new ToDo(input.substring(5)); - tasks.add(ignoreWord); - System.out.println("Got it, I've added the following task:\n" - + " " - + ignoreWord - + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } - } else if (input.startsWith("deadline")) { - if (input.length() < 10) { - System.out.println("☹ OOPS!!! The description of a deadline cannot be empty."); - } else { - String[] splitDetail = input.split("/by"); - String task = splitDetail[0]; - String date = splitDetail[1]; - Task detail = new Deadline(task, date); - tasks.add(detail); - System.out.println("Got it. I've added this task:\n" - + " " - + detail - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } - } else if (input.startsWith("event")) { - if (input.length() < 7) { - System.out.println("☹ OOPS!!! The description of a event cannot be empty."); - } else { - String[] splitEvent = input.split("/at"); - String event = splitEvent[0]; - String time = splitEvent[1]; - Task details = new Event(event, time); - tasks.add(details); - System.out.println("Got it. I've added this task:\n" - + " " - + details - + "\n" - + "Now you have " + tasks.size() + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } - } else { - System.out.println("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); - } - input = in.nextLine(); - } - } - } - - - - diff --git a/src/main/java/Tasks/Deadline.java b/src/main/java/Dukes/Deadline.java similarity index 95% rename from src/main/java/Tasks/Deadline.java rename to src/main/java/Dukes/Deadline.java index 474101aa..195958c1 100644 --- a/src/main/java/Tasks/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -1,4 +1,4 @@ -package Tasks; +package Dukes; public class Deadline extends Task { protected String by; diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java new file mode 100644 index 00000000..c0c2d81b --- /dev/null +++ b/src/main/java/Dukes/Duke.java @@ -0,0 +1,98 @@ +package Dukes; + +import java.util.Scanner; +import java.util.ArrayList; + +import static Dukes.Task.markAsDone; + + +public class Duke { + private static ArrayList tasks = new ArrayList<>(100); + private static Ui ui; + + public static void main(String[] args) { + ui.printWelcome(); + run(); + } + + public static void run() { + //Declare the object and initialize with + Scanner in = new Scanner(System.in); + //String input + String input = in.nextLine(); + while (!input.isEmpty()) { + if (input.startsWith("bye")) { + ui.showExit(); + break; + } else if (input.startsWith("list")) { + printList(); + } else if (input.startsWith("done")) { + markAsDone(input); + } else { + addTasks(input); + } + input = in.nextLine(); + } + } + + private static void printList() { + System.out.println(" ___________________________________________________________________\n" + + " Here are the tasks in your list:"); + for (int i = 0; i < tasks.size(); i++) { + System.out.println(" " + (i + 1) + "." + tasks.get(i)); + } + } + + private static void addTasks(String input){ + Task taskWord = new Task(""); + try { + if (input.startsWith("todo")) { + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); + } + taskWord = new ToDo(input.substring(5)); + } else if (input.startsWith("deadline")) { + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); + } + String task = splitDetail[0]; + String by = splitDetail[1]; + taskWord = new Deadline(task, by); + } else if (input.startsWith("event")) { + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0]; + String time = splitEvent[1]; + taskWord = new Event(event, time); + } else { + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + } + tasks.add(taskWord); + System.out.println("Got it, I've added the following task:\n" + + " " + + taskWord + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } catch (DukeException e) { + System.out.print(e.getMessage()); + } catch (Exception e) { + assert false : "Uncaught exception"; + } + } + } + + + + diff --git a/src/main/java/DukeException.java b/src/main/java/Dukes/DukeException.java similarity index 55% rename from src/main/java/DukeException.java rename to src/main/java/Dukes/DukeException.java index df16adca..4cc4d272 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/Dukes/DukeException.java @@ -1,5 +1,7 @@ -/*public class DukeException extends Exception { +package Dukes; + +public class DukeException extends Exception { public DukeException(String message) { super(message); } - }*/ \ No newline at end of file + } \ No newline at end of file diff --git a/src/main/java/Tasks/Event.java b/src/main/java/Dukes/Event.java similarity index 94% rename from src/main/java/Tasks/Event.java rename to src/main/java/Dukes/Event.java index 593dc80e..e26ff618 100644 --- a/src/main/java/Tasks/Event.java +++ b/src/main/java/Dukes/Event.java @@ -1,4 +1,4 @@ -package Tasks; +package Dukes; public class Event extends Task { protected String at; diff --git a/src/main/java/Tasks/Task.java b/src/main/java/Dukes/Task.java similarity index 54% rename from src/main/java/Tasks/Task.java rename to src/main/java/Dukes/Task.java index 8c2f6c53..5fcfb032 100644 --- a/src/main/java/Tasks/Task.java +++ b/src/main/java/Dukes/Task.java @@ -1,4 +1,4 @@ -package Tasks; +package Dukes; import java.util.ArrayList; @@ -15,10 +15,15 @@ public String getStatusIcon() { return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols } - public void setDone(){ + public void setDone() { this.isDone = true; } - public static void markAsDone(int arrayIndex) { + + @Override + public String toString() { + return "[" + getStatusIcon() + "] " + description; + } + public static void markDone(int arrayIndex) { ArrayList tasks = new ArrayList<>(); Task task = tasks.get(arrayIndex); task.setDone(); @@ -28,9 +33,22 @@ public static void markAsDone(int arrayIndex) { + "___________________________________________________________________\n"); } - @Override - public String toString() { - return "[" + getStatusIcon() + "] " + description; + public static void markAsDone(String input) { + try { + if (input.length() < 6) { + throw new DukeException("please key in correct format."); + } else { + String listActionIndex = (input.split(" "))[1]; + int arrayIndex = Integer.parseInt(listActionIndex) - 1; + markDone(arrayIndex); + } + }catch (DukeException e) { + System.out.println(e.getMessage()); + } catch (IndexOutOfBoundsException e) { + System.out.println("Please key in a number from the list."); + } } } + + diff --git a/src/main/java/Tasks/ToDo.java b/src/main/java/Dukes/ToDo.java similarity index 85% rename from src/main/java/Tasks/ToDo.java rename to src/main/java/Dukes/ToDo.java index 10fd61e6..9abc5990 100644 --- a/src/main/java/Tasks/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -1,4 +1,6 @@ -package Tasks; +package Dukes; + +import Dukes.Task; public class ToDo extends Task { diff --git a/src/main/java/Ui.java b/src/main/java/Dukes/Ui.java similarity index 97% rename from src/main/java/Ui.java rename to src/main/java/Dukes/Ui.java index bf1253a8..cff97425 100644 --- a/src/main/java/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -1,3 +1,5 @@ +package Dukes; + import java.util.Scanner; public class Ui { diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 3d71ebee..276f6e09 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -5,7 +5,7 @@ Hello from | |_| | |_| | < __/ |____/ \__,_|_|\_\___| -Hello! I'm Duke +Hello! I'm Dukes.Duke What can I do for you? Got it, I've added the following task: From 6045c175ea824f94da2730a58507687097f0d6da Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 4 Sep 2020 02:22:22 +0800 Subject: [PATCH 15/94] add empty list and done for handle error --- src/main/java/Dukes/Duke.java | 116 +++++++++++++++++++--------------- src/main/java/Dukes/Task.java | 24 ------- 2 files changed, 66 insertions(+), 74 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index c0c2d81b..daddd3ec 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -3,9 +3,6 @@ import java.util.Scanner; import java.util.ArrayList; -import static Dukes.Task.markAsDone; - - public class Duke { private static ArrayList tasks = new ArrayList<>(100); private static Ui ui; @@ -25,9 +22,11 @@ public static void run() { ui.showExit(); break; } else if (input.startsWith("list")) { - printList(); - } else if (input.startsWith("done")) { - markAsDone(input); + if(tasks.isEmpty()){ + System.out.println("no task in your list"); + } else { + printList(); + } } else { addTasks(input); } @@ -43,55 +42,72 @@ private static void printList() { } } - private static void addTasks(String input){ - Task taskWord = new Task(""); - try { - if (input.startsWith("todo")) { - if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); - } - taskWord = new ToDo(input.substring(5)); - } else if (input.startsWith("deadline")) { - if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); - } - String[] splitDetail = input.split("/by"); - if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); - } - String task = splitDetail[0]; - String by = splitDetail[1]; - taskWord = new Deadline(task, by); - } else if (input.startsWith("event")) { - if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); - } - String[] splitEvent = input.split("/at"); - if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); - } - String event = splitEvent[0]; - String time = splitEvent[1]; - taskWord = new Event(event, time); - } else { - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + private static void addTasks(String input) { + Task taskWord = new Task(""); + try { + if (input.startsWith("todo")) { + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); + } + taskWord = new ToDo(input.substring(5)); + addTaskCase(taskWord); + } else if (input.startsWith("deadline")) { + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); } - tasks.add(taskWord); - System.out.println("Got it, I've added the following task:\n" - + " " - + taskWord + String task = splitDetail[0]; + String by = splitDetail[1]; + taskWord = new Deadline(task, by); + addTaskCase(taskWord); + } else if (input.startsWith("event")) { + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0]; + String time = splitEvent[1]; + taskWord = new Event(event, time); + addTaskCase(taskWord); + } else if (input.startsWith("done")) { + if (input.length() < 6) { + throw new DukeException("please key in correct format."); + } + int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1, input.length())) - 1; + Task task = tasks.get(toEdit); + task.setDone(); + System.out.println(" Nice! I've marked this task as done:\n" + + task + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list.\n" + "___________________________________________________________________\n"); - } catch (DukeException e) { - System.out.print(e.getMessage()); - } catch (Exception e) { - assert false : "Uncaught exception"; - } + }else{ + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + } + }catch (DukeException e) { + System.out.print(e.getMessage()); + } catch (Exception e) { + assert false : "Uncaught exception"; } } + public static void addTaskCase(Task taskWord){ + tasks.add(taskWord); + System.out.println("Got it, I've added the following task:\n" + + " " + + taskWord + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list.\n" + + "___________________________________________________________________\n"); + } + +} diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index 5fcfb032..92ab29c2 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -23,31 +23,7 @@ public void setDone() { public String toString() { return "[" + getStatusIcon() + "] " + description; } - public static void markDone(int arrayIndex) { - ArrayList tasks = new ArrayList<>(); - Task task = tasks.get(arrayIndex); - task.setDone(); - System.out.println(" Nice! I've marked this task as done:\n" - + task - + "\n" - + "___________________________________________________________________\n"); - } - public static void markAsDone(String input) { - try { - if (input.length() < 6) { - throw new DukeException("please key in correct format."); - } else { - String listActionIndex = (input.split(" "))[1]; - int arrayIndex = Integer.parseInt(listActionIndex) - 1; - markDone(arrayIndex); - } - }catch (DukeException e) { - System.out.println(e.getMessage()); - } catch (IndexOutOfBoundsException e) { - System.out.println("Please key in a number from the list."); - } - } } From ae94c8eb45f72e1794957ea60ff50df8b8aef359 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 4 Sep 2020 02:34:37 +0800 Subject: [PATCH 16/94] change task class to abstract class --- src/main/java/Dukes/Duke.java | 7 +++++-- src/main/java/Dukes/Task.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index daddd3ec..96cbdaf7 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -43,7 +43,7 @@ private static void printList() { } private static void addTasks(String input) { - Task taskWord = new Task(""); + Task taskWord; try { if (input.startsWith("todo")) { if (input.length() < 6) { @@ -77,7 +77,10 @@ private static void addTasks(String input) { addTaskCase(taskWord); } else if (input.startsWith("done")) { if (input.length() < 6) { - throw new DukeException("please key in correct format."); + throw new DukeException("please key in correct format.\n"); + } + else if(tasks.isEmpty()){ + throw new DukeException("There is no task need to be done\n"); } int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1, input.length())) - 1; Task task = tasks.get(toEdit); diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index 92ab29c2..a1055b36 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -2,7 +2,7 @@ import java.util.ArrayList; -public class Task { +public abstract class Task { protected String description; protected boolean isDone; From 259f46aa5f8febbcf594cb6d4f02fa980cc52549 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 4 Sep 2020 02:38:32 +0800 Subject: [PATCH 17/94] all classes into one package --- src/main/java/Dukes/Duke.java | 1 + src/main/java/Dukes/Task.java | 1 - src/main/java/Dukes/ToDo.java | 1 - src/main/java/Dukes/Ui.java | 7 ------- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 96cbdaf7..be7b5c05 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -98,6 +98,7 @@ else if(tasks.isEmpty()){ assert false : "Uncaught exception"; } } + public static void addTaskCase(Task taskWord){ tasks.add(taskWord); System.out.println("Got it, I've added the following task:\n" diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index a1055b36..bbbfff86 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -1,6 +1,5 @@ package Dukes; -import java.util.ArrayList; public abstract class Task { protected String description; diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/ToDo.java index 9abc5990..b7125095 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -1,6 +1,5 @@ package Dukes; -import Dukes.Task; public class ToDo extends Task { diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index cff97425..e2e98a8e 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -3,16 +3,9 @@ import java.util.Scanner; public class Ui { - public Scanner in = new Scanner(System.in); - public Ui() { } - public String getInput() { - return in.nextLine(); - } - - public static void printWelcome() { String logo = " ____ _ \n" + "| _ \\ _ _| | _____ \n" From cda6cba260b62b9ad3d89358b854f29013226922 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 15:48:26 +0800 Subject: [PATCH 18/94] add delete --- src/main/java/Dukes/Duke.java | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index be7b5c05..ddf7051a 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -45,13 +45,13 @@ private static void printList() { private static void addTasks(String input) { Task taskWord; try { - if (input.startsWith("todo")) { + if (input.startsWith("todo") && input.contains(" ")) { if (input.length() < 6) { throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); } taskWord = new ToDo(input.substring(5)); addTaskCase(taskWord); - } else if (input.startsWith("deadline")) { + } else if (input.startsWith("deadline") && input.contains(" ")) { if (input.length() < 10) { throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); } @@ -63,7 +63,7 @@ private static void addTasks(String input) { String by = splitDetail[1]; taskWord = new Deadline(task, by); addTaskCase(taskWord); - } else if (input.startsWith("event")) { + } else if (input.startsWith("event") && input.contains(" ")) { if (input.length() < 7) { throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); } @@ -75,14 +75,29 @@ private static void addTasks(String input) { String time = splitEvent[1]; taskWord = new Event(event, time); addTaskCase(taskWord); - } else if (input.startsWith("done")) { + } else if(input.startsWith("delete") && input.contains(" ")) { + if (tasks.isEmpty()) { + throw new DukeException("There is no task to delete\n"); + }else if(input.length() < 8) { + throw new DukeException("please key in correct format.\n"); + } + int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + Task task = tasks.get(toDelete); + tasks.remove(toDelete); + System.out.println("Noted, I've removed the following task:\n" + + " " + + task + + "\n" + + "Now you have " + tasks.size() + + " tasks in the list."); + } else if(input.startsWith("done") && input.contains(" ")) { if (input.length() < 6) { throw new DukeException("please key in correct format.\n"); } else if(tasks.isEmpty()){ throw new DukeException("There is no task need to be done\n"); } - int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1, input.length())) - 1; + int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; Task task = tasks.get(toEdit); task.setDone(); System.out.println(" Nice! I've marked this task as done:\n" From 45cdfba515ec39a29cbd5710ccca624e05f165ca Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 16:21:07 +0800 Subject: [PATCH 19/94] Revert "add delete" This reverts commit cda6cba260b62b9ad3d89358b854f29013226922. --- src/main/java/Dukes/Duke.java | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index ddf7051a..be7b5c05 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -45,13 +45,13 @@ private static void printList() { private static void addTasks(String input) { Task taskWord; try { - if (input.startsWith("todo") && input.contains(" ")) { + if (input.startsWith("todo")) { if (input.length() < 6) { throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); } taskWord = new ToDo(input.substring(5)); addTaskCase(taskWord); - } else if (input.startsWith("deadline") && input.contains(" ")) { + } else if (input.startsWith("deadline")) { if (input.length() < 10) { throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); } @@ -63,7 +63,7 @@ private static void addTasks(String input) { String by = splitDetail[1]; taskWord = new Deadline(task, by); addTaskCase(taskWord); - } else if (input.startsWith("event") && input.contains(" ")) { + } else if (input.startsWith("event")) { if (input.length() < 7) { throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); } @@ -75,29 +75,14 @@ private static void addTasks(String input) { String time = splitEvent[1]; taskWord = new Event(event, time); addTaskCase(taskWord); - } else if(input.startsWith("delete") && input.contains(" ")) { - if (tasks.isEmpty()) { - throw new DukeException("There is no task to delete\n"); - }else if(input.length() < 8) { - throw new DukeException("please key in correct format.\n"); - } - int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; - Task task = tasks.get(toDelete); - tasks.remove(toDelete); - System.out.println("Noted, I've removed the following task:\n" - + " " - + task - + "\n" - + "Now you have " + tasks.size() - + " tasks in the list."); - } else if(input.startsWith("done") && input.contains(" ")) { + } else if (input.startsWith("done")) { if (input.length() < 6) { throw new DukeException("please key in correct format.\n"); } else if(tasks.isEmpty()){ throw new DukeException("There is no task need to be done\n"); } - int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1, input.length())) - 1; Task task = tasks.get(toEdit); task.setDone(); System.out.println(" Nice! I've marked this task as done:\n" From f032bcf2dffd76624d393e45b83f7202a38687da Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 16:57:51 +0800 Subject: [PATCH 20/94] add delete and some error to handle --- src/main/java/Dukes/Duke.java | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index be7b5c05..ba7b9cda 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -23,7 +23,7 @@ public static void run() { break; } else if (input.startsWith("list")) { if(tasks.isEmpty()){ - System.out.println("no task in your list"); + System.out.println("no task in your list."); } else { printList(); } @@ -45,13 +45,13 @@ private static void printList() { private static void addTasks(String input) { Task taskWord; try { - if (input.startsWith("todo")) { + if (input.startsWith("todo") && input.contains(" ")) { if (input.length() < 6) { throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); } taskWord = new ToDo(input.substring(5)); addTaskCase(taskWord); - } else if (input.startsWith("deadline")) { + } else if (input.startsWith("deadline") && input.contains(" ")) { if (input.length() < 10) { throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); } @@ -63,7 +63,7 @@ private static void addTasks(String input) { String by = splitDetail[1]; taskWord = new Deadline(task, by); addTaskCase(taskWord); - } else if (input.startsWith("event")) { + } else if (input.startsWith("event") && input.contains(" ")) { if (input.length() < 7) { throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); } @@ -75,14 +75,28 @@ private static void addTasks(String input) { String time = splitEvent[1]; taskWord = new Event(event, time); addTaskCase(taskWord); - } else if (input.startsWith("done")) { + } else if(input.startsWith("delete") && input.contains(" ")){ + if(tasks.isEmpty() || input.length() < 8) { + throw new DukeException(" There is no specific task to delete.\n"); + } + int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + Task task = tasks.get(toDelete); + tasks.remove(toDelete); + System.out.println("Noted, I've removed the following task:\n" + + " " + + task + + "\n" + + "Now you have " + + tasks.size() + + " tasks in the list."); + } else if (input.startsWith("done") && input.contains(" ")) { if (input.length() < 6) { throw new DukeException("please key in correct format.\n"); } else if(tasks.isEmpty()){ throw new DukeException("There is no task need to be done\n"); } - int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1, input.length())) - 1; + int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; Task task = tasks.get(toEdit); task.setDone(); System.out.println(" Nice! I've marked this task as done:\n" From ae1b097e90ed75a59d516c70d1043897fe9505b9 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 17:11:03 +0800 Subject: [PATCH 21/94] add delete --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index ba7b9cda..6ed4d87e 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -77,7 +77,7 @@ private static void addTasks(String input) { addTaskCase(taskWord); } else if(input.startsWith("delete") && input.contains(" ")){ if(tasks.isEmpty() || input.length() < 8) { - throw new DukeException(" There is no specific task to delete.\n"); + throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); } int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; Task task = tasks.get(toDelete); From 060086149b8deb8e3248d882e53d96ce308f9304 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 21:30:34 +0800 Subject: [PATCH 22/94] store in hard disk --- src/main/java/Dukes/Deadline.java | 5 +++ src/main/java/Dukes/Duke.java | 72 ++++++++++++++++++++++++++++++- src/main/java/Dukes/Event.java | 4 ++ src/main/java/Dukes/Task.java | 7 +++ src/main/java/Dukes/ToDo.java | 7 ++- 5 files changed, 92 insertions(+), 3 deletions(-) diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Deadline.java index 195958c1..6e3b521a 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -12,4 +12,9 @@ public Deadline(String description, String by) { public String toString() { return "[D]" + super.toString() + "(by:" + by + ")"; } + + @Override + public String toWriteFile() { + return "D | " + getFileStatusIcon() + " | " + description + " | " + by; + } } \ No newline at end of file diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 6ed4d87e..66bf9d05 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -2,23 +2,34 @@ import java.util.Scanner; import java.util.ArrayList; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.File; +import java.io.FileWriter; public class Duke { private static ArrayList tasks = new ArrayList<>(100); private static Ui ui; + static ArrayList task = new ArrayList<>(); + public static void main(String[] args) { ui.printWelcome(); run(); + readFile(); + writeFile(); } + + + public static void run() { //Declare the object and initialize with Scanner in = new Scanner(System.in); //String input String input = in.nextLine(); while (!input.isEmpty()) { - if (input.startsWith("bye")) { + if (input.startsWith("bye") || input.startsWith("exit")) { ui.showExit(); break; } else if (input.startsWith("list")) { @@ -76,7 +87,7 @@ private static void addTasks(String input) { taskWord = new Event(event, time); addTaskCase(taskWord); } else if(input.startsWith("delete") && input.contains(" ")){ - if(tasks.isEmpty() || input.length() < 8) { + if(tasks.isEmpty() || input.length() < 7) { throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); } int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; @@ -111,6 +122,7 @@ else if(tasks.isEmpty()){ } catch (Exception e) { assert false : "Uncaught exception"; } + } public static void addTaskCase(Task taskWord){ @@ -124,6 +136,62 @@ public static void addTaskCase(Task taskWord){ + " tasks in the list.\n" + "___________________________________________________________________\n"); } + private static void readFile() { + try { + File file = new File("src/main/java/Dukes/data/duke.txt"); + Scanner fileSc = new Scanner(file); + String input = fileSc.nextLine(); + System.out.println("Your previous task: "); + while (fileSc.hasNext()) { + String[] strArr = input.split(" \\| "); + Task tasks = null; + if (strArr[0].equals("T")) { + tasks = new ToDo(strArr[2]); + }else if(strArr[0].equals("D")) { + tasks = new Deadline(strArr[2], strArr[3]); + }else if(strArr[0].equals("E")) { + tasks = new Event(strArr[2], strArr[3]); + }else{ + throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); + } + if (strArr[1].equals("1")) { + tasks.setDone(); + } + task.add(tasks); + System.out.println(strArr); + } + + } catch (FileNotFoundException e) { + System.out.println("You have no task."); + } catch (DukeException e) { + try { + System.out.println(e.getMessage()); + FileWriter fw = new FileWriter("src/main/java/Dukes/data/duke.txt"); + String fileDetails = ""; + fw.write(fileDetails); + fw.close(); + } catch (IOException ex) { + System.out.println("FileWriting got problem"); + ex.printStackTrace(); + } + } + } + private static void writeFile() { + try { + FileWriter fw = new FileWriter("src/main/java/Dukes/data/duke.txt"); + String fileDetails = ""; + for (Task task : tasks) { + fileDetails += task.toWriteFile() + "\n"; + } + System.out.println(fileDetails); + fw.write(fileDetails); + fw.close(); + } catch (IOException e) { + assert(false); + } + } + + } diff --git a/src/main/java/Dukes/Event.java b/src/main/java/Dukes/Event.java index e26ff618..b3fdc0ed 100644 --- a/src/main/java/Dukes/Event.java +++ b/src/main/java/Dukes/Event.java @@ -12,5 +12,9 @@ public Event(String description, String at) { public String toString() { return "[E]" + super.toString() + "(at:" + at + ")"; } + + public String toWriteFile() { + return "E | " + getFileStatusIcon() + " | " + description + " | " + at; + } } diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index bbbfff86..606cb2c7 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -14,6 +14,10 @@ public String getStatusIcon() { return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols } + public String getFileStatusIcon() { + return (isDone ? "1" : "0"); + } + public void setDone() { this.isDone = true; } @@ -23,6 +27,9 @@ public String toString() { return "[" + getStatusIcon() + "] " + description; } + public String toWriteFile() { + return "T | " + getFileStatusIcon() + " | " + description; + } } diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/ToDo.java index b7125095..1675e5dd 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -3,7 +3,7 @@ public class ToDo extends Task { - public ToDo(String description){ + public ToDo(String description) { super(description); } @@ -11,4 +11,9 @@ public ToDo(String description){ public String toString() { return "[T]" + super.toString(); } + + @Override + public String toWriteFile() { + return "T | " + getFileStatusIcon() + " | " + description; + } } From 25737863cbc7de0274273dd174ad7348f07af12e Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 6 Sep 2020 21:32:03 +0800 Subject: [PATCH 23/94] store in hard disk --- src/main/java/Dukes/data/duke.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/main/java/Dukes/data/duke.txt diff --git a/src/main/java/Dukes/data/duke.txt b/src/main/java/Dukes/data/duke.txt new file mode 100644 index 00000000..35ad7a2a --- /dev/null +++ b/src/main/java/Dukes/data/duke.txt @@ -0,0 +1,4 @@ +T | 1 | read book +D | 0 | deadline return book | june 6th +E | 0 | event project meeting | Aug 6th 2-4pm +T | 1 | join sports club From 924a9f2f380f49e153d290773a688ad42e346bf8 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 7 Sep 2020 22:46:11 +0800 Subject: [PATCH 24/94] Revert "store in hard disk" This reverts commit 25737863cbc7de0274273dd174ad7348f07af12e. --- src/main/java/Dukes/data/duke.txt | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src/main/java/Dukes/data/duke.txt diff --git a/src/main/java/Dukes/data/duke.txt b/src/main/java/Dukes/data/duke.txt deleted file mode 100644 index 35ad7a2a..00000000 --- a/src/main/java/Dukes/data/duke.txt +++ /dev/null @@ -1,4 +0,0 @@ -T | 1 | read book -D | 0 | deadline return book | june 6th -E | 0 | event project meeting | Aug 6th 2-4pm -T | 1 | join sports club From 0eed44e0a4f57b6f980dd406d7e541bfb11c46db Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 7 Sep 2020 23:02:22 +0800 Subject: [PATCH 25/94] add delete with some handle error --- src/main/java/Dukes/Deadline.java | 5 --- src/main/java/Dukes/Duke.java | 61 +------------------------------ src/main/java/Dukes/Event.java | 3 -- src/main/java/Dukes/Task.java | 6 --- src/main/java/Dukes/ToDo.java | 5 +-- 5 files changed, 2 insertions(+), 78 deletions(-) diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Deadline.java index 6e3b521a..195958c1 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -12,9 +12,4 @@ public Deadline(String description, String by) { public String toString() { return "[D]" + super.toString() + "(by:" + by + ")"; } - - @Override - public String toWriteFile() { - return "D | " + getFileStatusIcon() + " | " + description + " | " + by; - } } \ No newline at end of file diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 66bf9d05..c2e25d35 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -16,13 +16,8 @@ public class Duke { public static void main(String[] args) { ui.printWelcome(); run(); - readFile(); - writeFile(); } - - - public static void run() { //Declare the object and initialize with Scanner in = new Scanner(System.in); @@ -73,6 +68,7 @@ private static void addTasks(String input) { String task = splitDetail[0]; String by = splitDetail[1]; taskWord = new Deadline(task, by); + //taskWord = new Deadline(task, Deadline.timeChange(by)); addTaskCase(taskWord); } else if (input.startsWith("event") && input.contains(" ")) { if (input.length() < 7) { @@ -136,61 +132,6 @@ public static void addTaskCase(Task taskWord){ + " tasks in the list.\n" + "___________________________________________________________________\n"); } - private static void readFile() { - try { - File file = new File("src/main/java/Dukes/data/duke.txt"); - Scanner fileSc = new Scanner(file); - String input = fileSc.nextLine(); - System.out.println("Your previous task: "); - while (fileSc.hasNext()) { - String[] strArr = input.split(" \\| "); - Task tasks = null; - if (strArr[0].equals("T")) { - tasks = new ToDo(strArr[2]); - }else if(strArr[0].equals("D")) { - tasks = new Deadline(strArr[2], strArr[3]); - }else if(strArr[0].equals("E")) { - tasks = new Event(strArr[2], strArr[3]); - }else{ - throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); - } - if (strArr[1].equals("1")) { - tasks.setDone(); - } - task.add(tasks); - System.out.println(strArr); - } - - } catch (FileNotFoundException e) { - System.out.println("You have no task."); - } catch (DukeException e) { - try { - System.out.println(e.getMessage()); - FileWriter fw = new FileWriter("src/main/java/Dukes/data/duke.txt"); - String fileDetails = ""; - fw.write(fileDetails); - fw.close(); - } catch (IOException ex) { - System.out.println("FileWriting got problem"); - ex.printStackTrace(); - } - } - } - private static void writeFile() { - try { - FileWriter fw = new FileWriter("src/main/java/Dukes/data/duke.txt"); - String fileDetails = ""; - for (Task task : tasks) { - fileDetails += task.toWriteFile() + "\n"; - } - System.out.println(fileDetails); - fw.write(fileDetails); - fw.close(); - } catch (IOException e) { - assert(false); - } - } - } diff --git a/src/main/java/Dukes/Event.java b/src/main/java/Dukes/Event.java index b3fdc0ed..b8d767e7 100644 --- a/src/main/java/Dukes/Event.java +++ b/src/main/java/Dukes/Event.java @@ -13,8 +13,5 @@ public String toString() { return "[E]" + super.toString() + "(at:" + at + ")"; } - public String toWriteFile() { - return "E | " + getFileStatusIcon() + " | " + description + " | " + at; - } } diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index 606cb2c7..22713914 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -14,9 +14,6 @@ public String getStatusIcon() { return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols } - public String getFileStatusIcon() { - return (isDone ? "1" : "0"); - } public void setDone() { this.isDone = true; @@ -27,9 +24,6 @@ public String toString() { return "[" + getStatusIcon() + "] " + description; } - public String toWriteFile() { - return "T | " + getFileStatusIcon() + " | " + description; - } } diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/ToDo.java index 1675e5dd..5e5855cb 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -12,8 +12,5 @@ public String toString() { return "[T]" + super.toString(); } - @Override - public String toWriteFile() { - return "T | " + getFileStatusIcon() + " | " + description; - } + } From 656ae967267c0b8c6bcf999e41e63d2656585f49 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 7 Sep 2020 23:47:40 +0800 Subject: [PATCH 26/94] edit the add delete task --- src/main/java/Dukes/Duke.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index c2e25d35..07b9915c 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -19,9 +19,7 @@ public static void main(String[] args) { } public static void run() { - //Declare the object and initialize with Scanner in = new Scanner(System.in); - //String input String input = in.nextLine(); while (!input.isEmpty()) { if (input.startsWith("bye") || input.startsWith("exit")) { From 345c402e419979c6814a553dc1a2676dac9d6b08 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 8 Sep 2020 00:38:00 +0800 Subject: [PATCH 27/94] add store in hard disk --- src/main/java/Dukes/Deadline.java | 5 +++ src/main/java/Dukes/Duke.java | 60 +++++++++++++++++++++++++++++-- src/main/java/Dukes/Event.java | 5 ++- src/main/java/Dukes/Task.java | 8 ++++- src/main/java/Dukes/ToDo.java | 6 ++++ src/main/java/data/duke.txt | 4 +++ 6 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 src/main/java/data/duke.txt diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Deadline.java index 195958c1..523f7fd3 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -12,4 +12,9 @@ public Deadline(String description, String by) { public String toString() { return "[D]" + super.toString() + "(by:" + by + ")"; } + + @Override + public String toWriteFile() { + return "D | " + getFileStatusIcon()+ " | " + description + " | " + by; + } } \ No newline at end of file diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index c2e25d35..1fa23bfc 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -16,12 +16,12 @@ public class Duke { public static void main(String[] args) { ui.printWelcome(); run(); + readFile(); + writeFile(); } public static void run() { - //Declare the object and initialize with Scanner in = new Scanner(System.in); - //String input String input = in.nextLine(); while (!input.isEmpty()) { if (input.startsWith("bye") || input.startsWith("exit")) { @@ -132,6 +132,62 @@ public static void addTaskCase(Task taskWord){ + " tasks in the list.\n" + "___________________________________________________________________\n"); } + private static void readFile() { + try { + File file = new File("src/main/java/data/duke.txt"); + Scanner fileSc = new Scanner(file); + System.out.println("Your task are: "); + while (fileSc.hasNext()) { + String input = fileSc.nextLine(); + String[] strArr = input.split(" \\| "); + Task tasks = null; + if (strArr[0].equals("T")) { + tasks = new ToDo(strArr[2]); + }else if(strArr[0].equals("D")) { + tasks = new Deadline(strArr[2], strArr[3]); + }else if(strArr[0].equals("E")) { + tasks = new Event(strArr[2], strArr[3]); + }else{ + throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); + } + if (strArr[1].equals("1")) { + tasks.setDone(); + } + task.add(tasks); + System.out.println(strArr); + } + + } catch (FileNotFoundException e) { + System.out.println("You have no task."); + } catch (DukeException e) { + try { + System.out.println(e.getMessage()); + FileWriter fw = new FileWriter("src/main/java/data/duke.txt"); + String fileDetails = ""; + fw.write(fileDetails); + fw.close(); + } catch (IOException ex) { + System.out.println("FileWriting got problem"); + ex.printStackTrace(); + } + } + } + private static void writeFile() { + try { + FileWriter fw = new FileWriter("src/main/java/data/duke.txt"); + String fileDetails = ""; + for (Task task : tasks) { + fileDetails += task.toWriteFile() + "\n"; + } + System.out.println(fileDetails); + fw.write(fileDetails); + fw.close(); + } catch (IOException e) { + assert(false); + } + } + + } diff --git a/src/main/java/Dukes/Event.java b/src/main/java/Dukes/Event.java index b8d767e7..d17ef2fb 100644 --- a/src/main/java/Dukes/Event.java +++ b/src/main/java/Dukes/Event.java @@ -12,6 +12,9 @@ public Event(String description, String at) { public String toString() { return "[E]" + super.toString() + "(at:" + at + ")"; } - + @Override + public String toWriteFile() { + return "E | " + getFileStatusIcon() + " | " + description + " | " + at; + } } diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index 22713914..8bf94b0e 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -13,7 +13,9 @@ public Task(String description) { public String getStatusIcon() { return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols } - + public String getFileStatusIcon() { + return (isDone ? "1" : "0"); + } public void setDone() { this.isDone = true; @@ -24,6 +26,10 @@ public String toString() { return "[" + getStatusIcon() + "] " + description; } + public String toWriteFile() { + return "T | " + getFileStatusIcon() + " | " + description; + } + } diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/ToDo.java index 5e5855cb..2d0fcb8b 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -12,5 +12,11 @@ public String toString() { return "[T]" + super.toString(); } + @Override + public String toWriteFile() { + return "T | " + getFileStatusIcon() + " | " + description; + } + + } diff --git a/src/main/java/data/duke.txt b/src/main/java/data/duke.txt new file mode 100644 index 00000000..6d749a3c --- /dev/null +++ b/src/main/java/data/duke.txt @@ -0,0 +1,4 @@ +T | 1 | read book +D | 0 | deadline return book | June 6th +E | 0 | event project meeting | Aug 6th 2-4pm +T | 1 | join sport club From 517674991dfda74f94fed8e3e03f81abe551b7ac Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 02:11:20 +0800 Subject: [PATCH 28/94] more OOP --- src/main/java/Dukes/Deadline.java | 7 +- src/main/java/Dukes/Duke.java | 206 +++--------------- .../java/Dukes/FileNotFoundException.java | 7 + src/main/java/Dukes/Parser.java | 159 ++++++++++++++ src/main/java/Dukes/Storage.java | 65 ++++++ src/main/java/Dukes/Task.java | 3 +- src/main/java/Dukes/TaskList.java | 113 ++++++++++ src/main/java/Dukes/Ui.java | 62 +++++- src/main/java/Dukes/command/AddCommand.java | 18 ++ src/main/java/Dukes/command/Command.java | 20 ++ .../java/Dukes/command/DeleteCommand.java | 19 ++ src/main/java/Dukes/command/DoneCommand.java | 23 ++ src/main/java/Dukes/command/ExitCommand.java | 14 ++ src/main/java/Dukes/command/ListCommand.java | 27 +++ src/main/java/data/duke.txt | 4 - 15 files changed, 561 insertions(+), 186 deletions(-) create mode 100644 src/main/java/Dukes/FileNotFoundException.java create mode 100644 src/main/java/Dukes/Parser.java create mode 100644 src/main/java/Dukes/Storage.java create mode 100644 src/main/java/Dukes/TaskList.java create mode 100644 src/main/java/Dukes/command/AddCommand.java create mode 100644 src/main/java/Dukes/command/Command.java create mode 100644 src/main/java/Dukes/command/DeleteCommand.java create mode 100644 src/main/java/Dukes/command/DoneCommand.java create mode 100644 src/main/java/Dukes/command/ExitCommand.java create mode 100644 src/main/java/Dukes/command/ListCommand.java delete mode 100644 src/main/java/data/duke.txt diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Deadline.java index 523f7fd3..05dd5098 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -1,5 +1,6 @@ package Dukes; + public class Deadline extends Task { protected String by; @@ -15,6 +16,8 @@ public String toString() { @Override public String toWriteFile() { - return "D | " + getFileStatusIcon()+ " | " + description + " | " + by; + return "D | " + getFileStatusIcon() + " | " + description + " | " + by; + } -} \ No newline at end of file +} + diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 1fa23bfc..81c98ada 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -1,195 +1,49 @@ package Dukes; -import java.util.Scanner; -import java.util.ArrayList; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.File; -import java.io.FileWriter; -public class Duke { - private static ArrayList tasks = new ArrayList<>(100); - private static Ui ui; - static ArrayList task = new ArrayList<>(); +import Dukes.command.Command; +import java.io.FileNotFoundException; - public static void main(String[] args) { - ui.printWelcome(); - run(); - readFile(); - writeFile(); - } - - public static void run() { - Scanner in = new Scanner(System.in); - String input = in.nextLine(); - while (!input.isEmpty()) { - if (input.startsWith("bye") || input.startsWith("exit")) { - ui.showExit(); - break; - } else if (input.startsWith("list")) { - if(tasks.isEmpty()){ - System.out.println("no task in your list."); - } else { - printList(); - } - } else { - addTasks(input); - } - input = in.nextLine(); - } - } - - private static void printList() { - System.out.println(" ___________________________________________________________________\n" - + " Here are the tasks in your list:"); - for (int i = 0; i < tasks.size(); i++) { - System.out.println(" " + (i + 1) + "." + tasks.get(i)); - } - } +public class Duke { + private Storage storage; + private TaskList tasks; + private Ui ui; - private static void addTasks(String input) { - Task taskWord; + public Duke(String path) throws Dukes.FileNotFoundException { + ui = new Ui(); + storage = new Storage(path); try { - if (input.startsWith("todo") && input.contains(" ")) { - if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty.\n"); - } - taskWord = new ToDo(input.substring(5)); - addTaskCase(taskWord); - } else if (input.startsWith("deadline") && input.contains(" ")) { - if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); - } - String[] splitDetail = input.split("/by"); - if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); - } - String task = splitDetail[0]; - String by = splitDetail[1]; - taskWord = new Deadline(task, by); - //taskWord = new Deadline(task, Deadline.timeChange(by)); - addTaskCase(taskWord); - } else if (input.startsWith("event") && input.contains(" ")) { - if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); - } - String[] splitEvent = input.split("/at"); - if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); - } - String event = splitEvent[0]; - String time = splitEvent[1]; - taskWord = new Event(event, time); - addTaskCase(taskWord); - } else if(input.startsWith("delete") && input.contains(" ")){ - if(tasks.isEmpty() || input.length() < 7) { - throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); - } - int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; - Task task = tasks.get(toDelete); - tasks.remove(toDelete); - System.out.println("Noted, I've removed the following task:\n" - + " " - + task - + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list."); - } else if (input.startsWith("done") && input.contains(" ")) { - if (input.length() < 6) { - throw new DukeException("please key in correct format.\n"); - } - else if(tasks.isEmpty()){ - throw new DukeException("There is no task need to be done\n"); - } - int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; - Task task = tasks.get(toEdit); - task.setDone(); - System.out.println(" Nice! I've marked this task as done:\n" - + task - + "\n" - + "___________________________________________________________________\n"); - }else{ - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); - } - }catch (DukeException e) { - System.out.print(e.getMessage()); - } catch (Exception e) { - assert false : "Uncaught exception"; + tasks = new TaskList(storage.load()); + } catch ( DukeException e ) { + ui.printLoadingError("Problem reading file. Starting with an empty task list"); + tasks = new TaskList(); } - } - public static void addTaskCase(Task taskWord){ - tasks.add(taskWord); - System.out.println("Got it, I've added the following task:\n" - + " " - + taskWord - + "\n" - + "Now you have " - + tasks.size() - + " tasks in the list.\n" - + "___________________________________________________________________\n"); - } - private static void readFile() { - try { - File file = new File("src/main/java/data/duke.txt"); - Scanner fileSc = new Scanner(file); - System.out.println("Your task are: "); - while (fileSc.hasNext()) { - String input = fileSc.nextLine(); - String[] strArr = input.split(" \\| "); - Task tasks = null; - if (strArr[0].equals("T")) { - tasks = new ToDo(strArr[2]); - }else if(strArr[0].equals("D")) { - tasks = new Deadline(strArr[2], strArr[3]); - }else if(strArr[0].equals("E")) { - tasks = new Event(strArr[2], strArr[3]); - }else{ - throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); - } - if (strArr[1].equals("1")) { - tasks.setDone(); - } - task.add(tasks); - System.out.println(strArr); - } - } catch (FileNotFoundException e) { - System.out.println("You have no task."); - } catch (DukeException e) { + public void run() { + ui.printWelcome(); + boolean isExit = false; + while (!isExit) { try { - System.out.println(e.getMessage()); - FileWriter fw = new FileWriter("src/main/java/data/duke.txt"); - String fileDetails = ""; - fw.write(fileDetails); - fw.close(); - } catch (IOException ex) { - System.out.println("FileWriting got problem"); - ex.printStackTrace(); + String fullCommand = ui.readCommand(); + ui.showLine(); // show the divider line ("_______") + Command c = Parser.parse(fullCommand); + c.execute(tasks, ui, storage); + isExit = c.isExit(); + } catch (DukeException e) { + ui.showError(e.getMessage()); + } finally { + ui.showLine(); } } } - private static void writeFile() { - try { - FileWriter fw = new FileWriter("src/main/java/data/duke.txt"); - String fileDetails = ""; - for (Task task : tasks) { - fileDetails += task.toWriteFile() + "\n"; - } - System.out.println(fileDetails); - fw.write(fileDetails); - fw.close(); - } catch (IOException e) { - assert(false); - } - } - - - + public static void main(String[] args) throws Dukes.FileNotFoundException { + assert (args.length) > 0; + new Duke("data/duke.txt").run(); + } } diff --git a/src/main/java/Dukes/FileNotFoundException.java b/src/main/java/Dukes/FileNotFoundException.java new file mode 100644 index 00000000..ac2ce71c --- /dev/null +++ b/src/main/java/Dukes/FileNotFoundException.java @@ -0,0 +1,7 @@ +package Dukes; + +public class FileNotFoundException extends DukeException{ + public FileNotFoundException(String message) { + super(message); + } +} diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java new file mode 100644 index 00000000..29c40d9c --- /dev/null +++ b/src/main/java/Dukes/Parser.java @@ -0,0 +1,159 @@ +package Dukes; + +import Dukes.command.*; + + +public class Parser { + + public static Command parse(String input) throws DukeException { + Task taskWord; + Command c; + String action = input.split(" ")[0].toLowerCase(); + switch (action) { + case "list": + c = new ListCommand(); + break; + + case "todo": + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); + } + taskWord = new ToDo(input.substring(5)); + c = new AddCommand(taskWord); + break; + + case "delete": + if (input.isEmpty() || input.length() < 7) { + throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); + } + int toDelete = Ui.indexDetails(input); + c = new DeleteCommand(toDelete); + break; + + case "done": + if (input.length() < 6) { + throw new DukeException("please key in correct format.\n"); + } + int toEdit = Ui.indexDetails(input); + c = new DoneCommand(toEdit); + break; + + case "deadline": + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); + } + String task = splitDetail[0].substring(9); + String by = splitDetail[1]; + taskWord = new Deadline(task, by); + c = new AddCommand(taskWord); + break; + + case "event": + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0].substring(7); + String time = splitEvent[1]; + taskWord = new Event(event, time); + c = new AddCommand(taskWord); + break; + + case "bye": + case "exit": + c = new ExitCommand(); + break; + + default: + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); + } + return c; + } +} + + + + + /* private static Command list() { + return new ListCommand(); + } + private void addCommandTask(String input) { + Task taskWord; + try { + if (input.startsWith("todo") && input.contains(" ")) { + + addTask(taskWord); + } else if (input.startsWith("deadline") && input.contains(" ")) { + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); + } + String task = splitDetail[0]; + String by = splitDetail[1]; + taskWord = new Deadline(task, by); + //taskWord = new Deadline(task, Deadline.timeChange(by)); + addTaskCase(taskWord); + } else if (input.startsWith("event") && input.contains(" ")) { + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0]; + String time = splitEvent[1]; + taskWord = new Event(event, time); + addTaskCase(taskWord); + } else if(input.startsWith("delete") && input.contains(" ")){ + if(tasks.isEmpty() || input.length() < 7) { + throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); + } + int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + Task task = tasks.getTask(toDelete); + tasks.deleteTask(toDelete); + System.out.println("Noted, I've removed the following task:\n" + + " " + + task + + "\n" + + "Now you have " + + tasks.getSize() + + " tasks in the list."); + } else if (input.startsWith("done") && input.contains(" ")) { + if (input.length() < 6) { + throw new DukeException("please key in correct format.\n"); + } + else if(tasks.isEmpty()){ + throw new DukeException("There is no task need to be done\n"); + } + int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + Task task = tasks.getTask(toEdit); + task.setDone(); + System.out.println(" Nice! I've marked this task as done:\n" + + task + + "\n" + + "___________________________________________________________________\n"); + }else{ + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + } + }catch (DukeException e) { + System.out.print(e.getMessage()); + } catch (Exception e) { + assert false : "Uncaught exception"; + System.out.println("Please input a date in this format : dd/MM/yy HHmm"); + } + + } + + +}*/ diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java new file mode 100644 index 00000000..3b2c212c --- /dev/null +++ b/src/main/java/Dukes/Storage.java @@ -0,0 +1,65 @@ +package Dukes; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Scanner; + +public class Storage { + private ArrayList details = new ArrayList(); + public static String filePath = "data/duke.txt"; + + public Storage(String filepath) { + this.filePath = filePath; + } + + public ArrayList load() throws DukeException{ + try { + File file = new File(filePath); + file.createNewFile(); + Scanner in = new Scanner(file); + while (in.hasNext()) { + String input = in.nextLine(); + String[] strArr = input.split(" \\| "); + Task tasks = null; + if (strArr[0].equals("T")) { + tasks = new ToDo(strArr[2]); + } else if (strArr[0].equals("D")) { + tasks = new Deadline(strArr[2], strArr[3]); + } else if (strArr[0].equals("E")) { + tasks = new Event(strArr[2], strArr[3]); + } else { + throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); + } + if (strArr[1].equals("1")) { + tasks.markAsDone(); + } + details.add(input); + } + } catch (FileNotFoundException e) { + System.out.println("You have no task."); + } catch (IOException e) { + System.out.println("Problem occurred while creating a new file in Storage"); + assert (false); + } + return details; + } + + + public void saveTaskFile(ArrayList task) { + try { + FileWriter fw = new FileWriter("data/duke.txt"); + String fileDetails = ""; + for (Task t : task) { + fileDetails += t.toWriteFile() + "\n"; + } + fw.write(fileDetails); + fw.close(); + } catch (IOException e) { + System.out.println("FileWriting got problem"); + } + } +} + diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index 8bf94b0e..f0b7d6a3 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -17,8 +17,9 @@ public String getFileStatusIcon() { return (isDone ? "1" : "0"); } - public void setDone() { + public Task markAsDone() { this.isDone = true; + return this; } @Override diff --git a/src/main/java/Dukes/TaskList.java b/src/main/java/Dukes/TaskList.java new file mode 100644 index 00000000..5ae0d56a --- /dev/null +++ b/src/main/java/Dukes/TaskList.java @@ -0,0 +1,113 @@ +package Dukes; + +import java.util.ArrayList; + +public class TaskList { + protected ArrayList tasks = new ArrayList(100); + public ArrayList list = new ArrayList(); + + /*public TaskList(ArrayList content) throws DukeException { + for (String s : content) { + loadTask(s); + } + }*/ + public TaskList(ArrayList load){ + + } + + public TaskList() { + + } + /* public void loadTask(String s) throws DukeException { + String[] strArr = s.split(" \\| "); + String action = strArr[0]; + Task t; + switch (action) { + case "T": + t = new ToDo(strArr[2]); + break; + case "D": + t = new Deadline(strArr[2], strArr[3]); + break; + case "E": + t = new Event(strArr[2], strArr[3]); + break; + default: + throw new DukeException("Previous Task storage is corrupted. Resetting your task . ."); + } + if (strArr[1].equals("1")) { + t.markAsDone(); + } + list.add(t); + }*/ + + public void addTask(Task task) { + tasks.add(task); + } + + public int getSize() { + return tasks.size(); + } + + public boolean isEmpty() { + return false; + } + + public Task getTask(int index) { + return tasks.get(index); + } + + public void deleteTask(int index) { + tasks.remove(index); + } +} + + /* public void loadTask(String s) throws DukeException { + String[] strArr = s.split(" \\| "); + String action = strArr[0]; + Task t; + switch (action) { + case "T": + t = new ToDo(strArr[2]); + break; + case "D": + t = new Deadline(strArr[2], strArr[3]); + break; + case "E": + t = new Event(strArr[2], strArr[3]); + break; + default: + throw new DukeException("Previous Task storage is corrupted. Resetting your task . ."); + } + if (strArr[1].equals("1")) { + t.markAsDone(); + } + list.add(t); + } + + public TaskList(ArrayList detail) throws DukeException { + for (String s : detail) { + loadTask(s); + } + } +}*/ + + /* public void loadTask(String input) throws DukeException { + String[] strArr = input.split(" \\| "); + Task tasks = null; + if (strArr[0].equals("T")) { + tasks = new ToDo(strArr[2]); + } else if (strArr[0].equals("D")) { + tasks = new Deadline(strArr[2], strArr[3]); + } else if (strArr[0].equals("E")) { + tasks = new Event(strArr[2], strArr[3]); + } else { + throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); + } + if (strArr[1].equals("1")) { + tasks.markAsDone(); + } + list.add(tasks); + } + }*/ + diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index e2e98a8e..dc44ff87 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -1,12 +1,28 @@ package Dukes; +import java.util.ArrayList; import java.util.Scanner; + public class Ui { + private Scanner in = new Scanner(System.in); + + String readCommand() { + return in.nextLine(); + } + public Ui() { } - public static void printWelcome() { + public void showLine() { + System.out.println("____________________________________________________________\n"); + } + + public void showError(String message) { + System.out.println(message); + } + + public void printWelcome() { String logo = " ____ _ \n" + "| _ \\ _ _| | _____ \n" + "| | | | | | | |/ / _ \\\n" @@ -14,9 +30,49 @@ public static void printWelcome() { + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + + } + + public void showExitMessage(ArrayList tasks) { + + System.out.println("Your following tasks will be save: "); + for (Task t : tasks) { + System.out.println(t); + } + System.out.println("Bye. Hope to see you again soon!"); } - public static void showExit() { - System.out.println(" Bye. Hope to see you again soon!"); + public void printLoadingError(String s) { + System.out.println(s); + } + + + public static int indexDetails(String input) { + int number = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; + return number; + } + + public void printAddedMessage(Task task, int numberOfTasks) { + System.out.println("Got it. I've added this task: \n" + task); + System.out.println("Now you have " + numberOfTasks + (numberOfTasks == 1 ? " task" : " tasks") + " in the list."); + } + public void printDeleteMessage(Task task, int numberOfTasks) { + System.out.println("Noted. I've removed this task: \n" + task); + System.out.println("Now you have " + numberOfTasks + (numberOfTasks == 1 ? " task" : " tasks") + " in the list."); + } + + public void printDoneMessage(Task task) { + System.out.println("Nice! I've marked this task as done:\n" + + task); } } + + + + /* public void printList(TaskList tasks) { + System.out.println(" ___________________________________________________________________\n" + + " Here are the tasks in your list:"); + for (int i = 0; i < tasks.getSize(); i++) { + System.out.println(" " + (i + 1) + "." + tasks.getTask(i)); + } + }*/ \ No newline at end of file diff --git a/src/main/java/Dukes/command/AddCommand.java b/src/main/java/Dukes/command/AddCommand.java new file mode 100644 index 00000000..cd19bfe8 --- /dev/null +++ b/src/main/java/Dukes/command/AddCommand.java @@ -0,0 +1,18 @@ +package Dukes.command; + +import Dukes.Storage; +import Dukes.Task; +import Dukes.TaskList; +import Dukes.Ui; + +public class AddCommand extends Command { + public AddCommand(Task task) { + super.task = task; + } + + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) { + tasks.list.add(task); + ui.printAddedMessage(task, tasks.list.size()); + } +} diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java new file mode 100644 index 00000000..8a63abef --- /dev/null +++ b/src/main/java/Dukes/command/Command.java @@ -0,0 +1,20 @@ +package Dukes.command; + +import Dukes.Storage; +import Dukes.Task; +import Dukes.TaskList; +import Dukes.Ui; +import Dukes.DukeException; + +public abstract class Command { + + protected Task task; + protected int index; + + public abstract void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException; + + public boolean isExit() { + return false; + } + +} diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java new file mode 100644 index 00000000..127b45c7 --- /dev/null +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -0,0 +1,19 @@ +package Dukes.command; + +import Dukes.*; + +public class DeleteCommand extends Command{ + public DeleteCommand (int index){ + super.index =index; + } + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { + try { + Task deletedTask = tasks.list.remove(index); + ui.printDeleteMessage(deletedTask, tasks.list.size()); + } catch (IndexOutOfBoundsException e) { + throw new DukeException("Please key in a number from the list"); + } + } + +} diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java new file mode 100644 index 00000000..cd7e6d1a --- /dev/null +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -0,0 +1,23 @@ +package Dukes.command; + +import Dukes.Storage; +import Dukes.TaskList; +import Dukes.Task; +import Dukes.Ui; +import Dukes.DukeException; + +public class DoneCommand extends Command { + public DoneCommand(int index) { + super.index = index; + } + + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { + try { + Task doneTask = tasks.list.get(index).markAsDone(); + ui.printDoneMessage(doneTask); + } catch (IndexOutOfBoundsException e) { + throw new DukeException("Please key in a number from the list"); + } + } +} diff --git a/src/main/java/Dukes/command/ExitCommand.java b/src/main/java/Dukes/command/ExitCommand.java new file mode 100644 index 00000000..b0ca09f1 --- /dev/null +++ b/src/main/java/Dukes/command/ExitCommand.java @@ -0,0 +1,14 @@ +package Dukes.command; + +import Dukes.Storage; +import Dukes.TaskList; +import Dukes.Ui; + +public class ExitCommand extends Command { + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) { + ui.showExitMessage(tasks.list); + storage.saveTaskFile(tasks.list); + } + +} diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java new file mode 100644 index 00000000..f4e2eac1 --- /dev/null +++ b/src/main/java/Dukes/command/ListCommand.java @@ -0,0 +1,27 @@ +package Dukes.command; + +import Dukes.Storage; +import Dukes.TaskList; +import Dukes.Ui; + +public class ListCommand extends Command { + + public ListCommand() { + super(); + } + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) { + try { + if(!tasks.isEmpty()) { + System.out.println(" Here are the tasks in your list:"); + for (int i = 0; i < tasks.list.size(); i++) { + System.out.println(" " + (i + 1) + "." + tasks.list.get(i)); + } + } else{ + System.out.println("There are no tasks in your list"); + } + } catch (IndexOutOfBoundsException e) { + System.out.print("current task is empty in your list."); + } + } +} diff --git a/src/main/java/data/duke.txt b/src/main/java/data/duke.txt deleted file mode 100644 index 6d749a3c..00000000 --- a/src/main/java/data/duke.txt +++ /dev/null @@ -1,4 +0,0 @@ -T | 1 | read book -D | 0 | deadline return book | June 6th -E | 0 | event project meeting | Aug 6th 2-4pm -T | 1 | join sport club From 2aa299e70c508bf15a508ef26a1f4b81260060ce Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 03:41:02 +0800 Subject: [PATCH 29/94] add javaDoc --- src/main/java/Dukes/Deadline.java | 6 ++ src/main/java/Dukes/Duke.java | 34 +++++-- src/main/java/Dukes/DukeException.java | 6 +- src/main/java/Dukes/Event.java | 4 +- .../java/Dukes/FileNotFoundException.java | 6 +- src/main/java/Dukes/Parser.java | 19 +++- src/main/java/Dukes/Storage.java | 7 +- src/main/java/Dukes/Task.java | 22 ++++- src/main/java/Dukes/TaskList.java | 94 +------------------ src/main/java/Dukes/ToDo.java | 5 +- src/main/java/Dukes/Ui.java | 47 ++++++---- src/main/java/Dukes/command/AddCommand.java | 11 ++- src/main/java/Dukes/command/Command.java | 9 +- .../java/Dukes/command/DeleteCommand.java | 18 +++- src/main/java/Dukes/command/DoneCommand.java | 18 +++- src/main/java/Dukes/command/ExitCommand.java | 18 +++- src/main/java/Dukes/command/ListCommand.java | 15 ++- 17 files changed, 201 insertions(+), 138 deletions(-) diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Deadline.java index 05dd5098..8da576f2 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Deadline.java @@ -1,6 +1,12 @@ package Dukes; +/** + * 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 + */ public class Deadline extends Task { protected String by; diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 81c98ada..83a44dc3 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -1,16 +1,25 @@ package Dukes; - - import Dukes.command.Command; -import java.io.FileNotFoundException; +/** + * The Duke program implements an application that can store a list of task,save to a txt file. + * and print the task on the screen. + * it link to other classes which is an member for Duke such as Storage, Task and Ui Class + * + * @author LIN QING + * @version 1.0 + * @since 14/9/2020 + */ public class Duke { private Storage storage; private TaskList tasks; private Ui ui; - - public Duke(String path) throws Dukes.FileNotFoundException { + /** + * @param path program will store the task in this path + * @throws DukeException if problem reading file. + */ + public Duke(String path) { ui = new Ui(); storage = new Storage(path); try { @@ -21,14 +30,19 @@ public Duke(String path) throws Dukes.FileNotFoundException { } } - + /** + * run program implements an application that simply shows the tasks and print on the screen + * + * @return task and the number of task in the list + * @throws DukeExceptionException if the command word not in the case + */ public void run() { ui.printWelcome(); boolean isExit = false; while (!isExit) { try { String fullCommand = ui.readCommand(); - ui.showLine(); // show the divider line ("_______") + ui.showLine(); Command c = Parser.parse(fullCommand); c.execute(tasks, ui, storage); isExit = c.isExit(); @@ -39,8 +53,10 @@ public void run() { } } } - - public static void main(String[] args) throws Dukes.FileNotFoundException { + /** + * This is Main method which made use of Duke and run methods + */ + public static void main(String[] args){ assert (args.length) > 0; new Duke("data/duke.txt").run(); } diff --git a/src/main/java/Dukes/DukeException.java b/src/main/java/Dukes/DukeException.java index 4cc4d272..354a33cb 100644 --- a/src/main/java/Dukes/DukeException.java +++ b/src/main/java/Dukes/DukeException.java @@ -1,5 +1,9 @@ package Dukes; - +/** + * Represents a checked exception. + * A DukeException object corresponds to an exception that is thrown when user inputs are invalid or + * have the wrong format. + */ public class DukeException extends Exception { public DukeException(String message) { super(message); diff --git a/src/main/java/Dukes/Event.java b/src/main/java/Dukes/Event.java index d17ef2fb..345ebb8c 100644 --- a/src/main/java/Dukes/Event.java +++ b/src/main/java/Dukes/Event.java @@ -1,5 +1,7 @@ package Dukes; - +/** + * Represents an event task. + */ public class Event extends Task { protected String at; diff --git a/src/main/java/Dukes/FileNotFoundException.java b/src/main/java/Dukes/FileNotFoundException.java index ac2ce71c..c935762a 100644 --- a/src/main/java/Dukes/FileNotFoundException.java +++ b/src/main/java/Dukes/FileNotFoundException.java @@ -1,5 +1,9 @@ package Dukes; - +/** + * Represents a checked exception. + * A FileNotFoundException object corresponds to an exception that is thrown where file are invalid or + * have some issues. + */ public class FileNotFoundException extends DukeException{ public FileNotFoundException(String message) { super(message); diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 29c40d9c..20c8212d 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -1,9 +1,22 @@ package Dukes; -import Dukes.command.*; - - +import Dukes.command.AddCommand; +import Dukes.command.DeleteCommand; +import Dukes.command.DoneCommand; +import Dukes.command.ExitCommand; +import Dukes.command.Command; +import Dukes.command.ListCommand; + +/** + * Parser program containing methods that deals with parsing the user command to extract meaningful details from it. + */ public class Parser { + /** + * Processes the user input and creates the corresponding commands. + * @param input Command input by user. + * @return Corresponding command that is input by user. + * @throws DukeExceptionIf a new command cannot be created due to invalid input parameters. + */ public static Command parse(String input) throws DukeException { Task taskWord; diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index 3b2c212c..73c06989 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -7,6 +7,9 @@ import java.util.ArrayList; import java.util.Scanner; +/** + * Represents a storage in the hard disk. + */ public class Storage { private ArrayList details = new ArrayList(); public static String filePath = "data/duke.txt"; @@ -15,7 +18,7 @@ public Storage(String filepath) { this.filePath = filePath; } - public ArrayList load() throws DukeException{ + public ArrayList load() throws Dukes.FileNotFoundException { try { File file = new File(filePath); file.createNewFile(); @@ -31,7 +34,7 @@ public ArrayList load() throws DukeException{ } else if (strArr[0].equals("E")) { tasks = new Event(strArr[2], strArr[3]); } else { - throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); + throw new Dukes.FileNotFoundException("Previous Tasks are corrupted. Please resetting your task . ."); } if (strArr[1].equals("1")) { tasks.markAsDone(); diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index f0b7d6a3..ba7f3872 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -1,22 +1,34 @@ package Dukes; - +/** + * Represents a Task. + * Parent class of all other types of tasks. + * A Task object corresponds to a task to be added to a TaskList. + */ public abstract class Task { protected String description; protected boolean isDone; - + /** + * Constructor for Task. + * @param description Description of the task. + */ public Task(String description) { this.description = description; this.isDone = false; } - + /** + * Returns a tick icon if the task is completed and return a X icon if otherwise. + * @return Icon to indicate status of the task. + */ public String getStatusIcon() { - return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols + return (isDone ? "\u2713" : "\u2718"); } public String getFileStatusIcon() { return (isDone ? "1" : "0"); } - + /** + * Sets the task as done. + */ public Task markAsDone() { this.isDone = true; return this; diff --git a/src/main/java/Dukes/TaskList.java b/src/main/java/Dukes/TaskList.java index 5ae0d56a..e51b133f 100644 --- a/src/main/java/Dukes/TaskList.java +++ b/src/main/java/Dukes/TaskList.java @@ -2,112 +2,26 @@ import java.util.ArrayList; +/** + * Create a TaskList to store Task objects. + */ public class TaskList { protected ArrayList tasks = new ArrayList(100); public ArrayList list = new ArrayList(); - /*public TaskList(ArrayList content) throws DukeException { - for (String s : content) { - loadTask(s); - } - }*/ - public TaskList(ArrayList load){ - - } - public TaskList() { } - /* public void loadTask(String s) throws DukeException { - String[] strArr = s.split(" \\| "); - String action = strArr[0]; - Task t; - switch (action) { - case "T": - t = new ToDo(strArr[2]); - break; - case "D": - t = new Deadline(strArr[2], strArr[3]); - break; - case "E": - t = new Event(strArr[2], strArr[3]); - break; - default: - throw new DukeException("Previous Task storage is corrupted. Resetting your task . ."); - } - if (strArr[1].equals("1")) { - t.markAsDone(); - } - list.add(t); - }*/ - - public void addTask(Task task) { - tasks.add(task); - } - public int getSize() { - return tasks.size(); + public TaskList(ArrayList load) { } public boolean isEmpty() { return false; } - public Task getTask(int index) { - return tasks.get(index); - } - - public void deleteTask(int index) { - tasks.remove(index); - } } - /* public void loadTask(String s) throws DukeException { - String[] strArr = s.split(" \\| "); - String action = strArr[0]; - Task t; - switch (action) { - case "T": - t = new ToDo(strArr[2]); - break; - case "D": - t = new Deadline(strArr[2], strArr[3]); - break; - case "E": - t = new Event(strArr[2], strArr[3]); - break; - default: - throw new DukeException("Previous Task storage is corrupted. Resetting your task . ."); - } - if (strArr[1].equals("1")) { - t.markAsDone(); - } - list.add(t); - } - public TaskList(ArrayList detail) throws DukeException { - for (String s : detail) { - loadTask(s); - } - } -}*/ - /* public void loadTask(String input) throws DukeException { - String[] strArr = input.split(" \\| "); - Task tasks = null; - if (strArr[0].equals("T")) { - tasks = new ToDo(strArr[2]); - } else if (strArr[0].equals("D")) { - tasks = new Deadline(strArr[2], strArr[3]); - } else if (strArr[0].equals("E")) { - tasks = new Event(strArr[2], strArr[3]); - } else { - throw new DukeException("Previous Tasks are corrupted. Please resetting your task . ."); - } - if (strArr[1].equals("1")) { - tasks.markAsDone(); - } - list.add(tasks); - } - }*/ diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/ToDo.java index 2d0fcb8b..b1139485 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/ToDo.java @@ -1,6 +1,9 @@ package Dukes; - +/** + * Represents a todo task. + * An Todoobject corresponds to a type of Task object with a task to be completed. + */ public class ToDo extends Task { public ToDo(String description) { diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index dc44ff87..4dfa0461 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -3,10 +3,15 @@ import java.util.ArrayList; import java.util.Scanner; - +/** + * Create a UI class to manage user interface for users and handles interaction between the user + */ public class Ui { private Scanner in = new Scanner(System.in); - + /** + * Reads user input. + * @return User input. + */ String readCommand() { return in.nextLine(); } @@ -21,7 +26,9 @@ public void showLine() { public void showError(String message) { System.out.println(message); } - + /** + * Prints the Duke logo and greets the user for the first time the program is run. + */ public void printWelcome() { String logo = " ____ _ \n" + "| _ \\ _ _| | _____ \n" @@ -32,7 +39,9 @@ public void printWelcome() { System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); } - + /** + * Prints the bye message and the list that will be save in hard disk when the user exits the program. + */ public void showExitMessage(ArrayList tasks) { System.out.println("Your following tasks will be save: "); @@ -41,7 +50,9 @@ public void showExitMessage(ArrayList tasks) { } System.out.println("Bye. Hope to see you again soon!"); } - + /** + * Prints the error when the information in storage could not be loaded. + */ public void printLoadingError(String s) { System.out.println(s); } @@ -51,28 +62,30 @@ public static int indexDetails(String input) { int number = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; return number; } - + /** + * Prints the message to inform user of a successful addition of a task to the list. + * @param task Task that has been added. + * @param numberOfTasks Number of tasks currently in the list. + */ public void printAddedMessage(Task task, int numberOfTasks) { System.out.println("Got it. I've added this task: \n" + task); System.out.println("Now you have " + numberOfTasks + (numberOfTasks == 1 ? " task" : " tasks") + " in the list."); - } + } /** + * Prints the message to inform user of a successful deletion. + * @param task Task that has been deleted. + * @param numberOfTasks Number of tasks left in the list. + */ public void printDeleteMessage(Task task, int numberOfTasks) { System.out.println("Noted. I've removed this task: \n" + task); System.out.println("Now you have " + numberOfTasks + (numberOfTasks == 1 ? " task" : " tasks") + " in the list."); } - + /** + * Prints the message to inform user that a task has been successfully marked as done. + * @param task Task that has been marked as done. + */ public void printDoneMessage(Task task) { System.out.println("Nice! I've marked this task as done:\n" + task); } } - - - /* public void printList(TaskList tasks) { - System.out.println(" ___________________________________________________________________\n" - + " Here are the tasks in your list:"); - for (int i = 0; i < tasks.getSize(); i++) { - System.out.println(" " + (i + 1) + "." + tasks.getTask(i)); - } - }*/ \ No newline at end of file diff --git a/src/main/java/Dukes/command/AddCommand.java b/src/main/java/Dukes/command/AddCommand.java index cd19bfe8..c6b3ec76 100644 --- a/src/main/java/Dukes/command/AddCommand.java +++ b/src/main/java/Dukes/command/AddCommand.java @@ -4,12 +4,21 @@ import Dukes.Task; import Dukes.TaskList; import Dukes.Ui; - +/** + * Create an AddCommand. It adds tasks to user's list. + */ public class AddCommand extends Command { public AddCommand(Task task) { super.task = task; } + /** + * Adds a single task to user's list. + * + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files and temporary store in hard disk. + */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) { tasks.list.add(task); diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java index 8a63abef..ad28c028 100644 --- a/src/main/java/Dukes/command/Command.java +++ b/src/main/java/Dukes/command/Command.java @@ -5,7 +5,10 @@ import Dukes.TaskList; import Dukes.Ui; import Dukes.DukeException; - +/** + * Represents a command. + * Parent class of all other types of commands to perform some action. + */ public abstract class Command { protected Task task; @@ -13,6 +16,10 @@ public abstract class Command { public abstract void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException; + /** + * Checks if this object is an ExitCommand. + * @return Whether this command is an exit command. + */ public boolean isExit() { return false; } diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java index 127b45c7..c9c5957d 100644 --- a/src/main/java/Dukes/command/DeleteCommand.java +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -1,11 +1,25 @@ package Dukes.command; -import Dukes.*; - +import Dukes.Storage; +import Dukes.TaskList; +import Dukes.Task; +import Dukes.Ui; +import Dukes.DukeException; +/** + * Create a DeleteCommand. It removes user's task from the list. + */ public class DeleteCommand extends Command{ public DeleteCommand (int index){ super.index =index; } + /** + * Adds a delete task to user's list. + * + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files and temporary store in hard disk. + * @throws DukeException If user key in a number that is not in the TaskList. + */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { try { diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java index cd7e6d1a..ddafd76a 100644 --- a/src/main/java/Dukes/command/DoneCommand.java +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -6,11 +6,27 @@ import Dukes.Ui; import Dukes.DukeException; +/** + * Represents a done command. + * A DoneCommand object corresponds to a command to mark a TaskList object + * in a TaskList as done. + */ public class DoneCommand extends Command { + /** + * Constructor for DoneCommand. + * @param index Index of object that is to be marked as done in a TaskList object. + */ public DoneCommand(int index) { super.index = index; } - + /** + * Adds a done task to user's list. + * + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files and temporary store in hard disk. + * @throws DukeException If user key in a number that is not in the TaskList. + */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { try { diff --git a/src/main/java/Dukes/command/ExitCommand.java b/src/main/java/Dukes/command/ExitCommand.java index b0ca09f1..e98dc734 100644 --- a/src/main/java/Dukes/command/ExitCommand.java +++ b/src/main/java/Dukes/command/ExitCommand.java @@ -3,12 +3,28 @@ import Dukes.Storage; import Dukes.TaskList; import Dukes.Ui; - +/** + * Create an ExitCommand. It ends and exit the programme and stores user's tasks. + */ public class ExitCommand extends Command { + /** + * Saves the tasks into storage and ends the programme. + * + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files and temporary store in hard disk. + */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) { ui.showExitMessage(tasks.list); storage.saveTaskFile(tasks.list); } + /** + * Checks if this object is an ExitCommand. + * @return Whether this command is an exit command. + */ + public boolean isExit() { + return true; + } } diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java index f4e2eac1..31946377 100644 --- a/src/main/java/Dukes/command/ListCommand.java +++ b/src/main/java/Dukes/command/ListCommand.java @@ -3,12 +3,23 @@ import Dukes.Storage; import Dukes.TaskList; import Dukes.Ui; - +/** + * Create a ListCommand. It lists all tasks for users. + */ public class ListCommand extends Command { - + /** + * Constructor for ListCommand. + */ public ListCommand() { super(); } + /** + * print commands detail into the TaskList. + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files and temporary store in hard disk. + * @throws IndexOutOfBoundsException if there is empty list. + */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) { try { From 7e022f5cc38ab0fb105f5b533486da4c3cb8e8d4 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 05:11:32 +0800 Subject: [PATCH 30/94] edit packages --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 81c98ada..15040790 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -16,7 +16,7 @@ public Duke(String path) throws Dukes.FileNotFoundException { try { tasks = new TaskList(storage.load()); } catch ( DukeException e ) { - ui.printLoadingError("Problem reading file. Starting with an empty task list"); + ui.printLoadingError("Problem reading file. an empty task list is there"); tasks = new TaskList(); } } From 2b8dde04a62c4c0d48e8e13f1bb3c6c388f10bbc Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 05:15:02 +0800 Subject: [PATCH 31/94] update for merge level 5 --- src/main/java/Dukes/Duke.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 15040790..9e095a31 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -10,7 +10,7 @@ public class Duke { private TaskList tasks; private Ui ui; - public Duke(String path) throws Dukes.FileNotFoundException { + public Duke(String path) throws FileNotFoundException { ui = new Ui(); storage = new Storage(path); try { @@ -28,7 +28,7 @@ public void run() { while (!isExit) { try { String fullCommand = ui.readCommand(); - ui.showLine(); // show the divider line ("_______") + ui.showLine(); Command c = Parser.parse(fullCommand); c.execute(tasks, ui, storage); isExit = c.isExit(); @@ -40,7 +40,7 @@ public void run() { } } - public static void main(String[] args) throws Dukes.FileNotFoundException { + public static void main(String[] args) throws FileNotFoundException { assert (args.length) > 0; new Duke("data/duke.txt").run(); } From 18fda539226cd56f237de5206252570ad7757bfb Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 05:19:22 +0800 Subject: [PATCH 32/94] include branch for abstractClass --- src/main/java/Dukes/Task.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Task.java index f0b7d6a3..5dcef2a8 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Task.java @@ -11,7 +11,7 @@ public Task(String description) { } public String getStatusIcon() { - return (isDone ? "\u2713" : "\u2718"); //return tick or X symbols + return (isDone ? "\u2713" : "\u2718"); } public String getFileStatusIcon() { return (isDone ? "1" : "0"); From 6f056a62cfed66d19c2c8b6ea378502c1e558082 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 05:23:03 +0800 Subject: [PATCH 33/94] java doc --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 83a44dc3..e0f99c6e 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -34,7 +34,7 @@ public Duke(String path) { * run program implements an application that simply shows the tasks and print on the screen * * @return task and the number of task in the list - * @throws DukeExceptionException if the command word not in the case + * @throws DukeExceptionException if the command word not in the case. */ public void run() { ui.printWelcome(); From 77a5449667d50cac82c39f11a1b6faed7e72c3d6 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 05:27:37 +0800 Subject: [PATCH 34/94] exceptions --- src/main/java/Dukes/Duke.java | 1 + src/main/java/Dukes/{ => Exceptions}/DukeException.java | 2 +- .../java/Dukes/{ => Exceptions}/FileNotFoundException.java | 7 +++++-- src/main/java/Dukes/Parser.java | 1 + src/main/java/Dukes/Storage.java | 4 ++-- src/main/java/Dukes/command/Command.java | 2 +- src/main/java/Dukes/command/DeleteCommand.java | 2 +- src/main/java/Dukes/command/DoneCommand.java | 2 +- 8 files changed, 13 insertions(+), 8 deletions(-) rename src/main/java/Dukes/{ => Exceptions}/DukeException.java (92%) rename src/main/java/Dukes/{ => Exceptions}/FileNotFoundException.java (67%) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index e0f99c6e..dbd50720 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -1,4 +1,5 @@ package Dukes; +import Dukes.Exceptions.DukeException; import Dukes.command.Command; diff --git a/src/main/java/Dukes/DukeException.java b/src/main/java/Dukes/Exceptions/DukeException.java similarity index 92% rename from src/main/java/Dukes/DukeException.java rename to src/main/java/Dukes/Exceptions/DukeException.java index 354a33cb..4847df81 100644 --- a/src/main/java/Dukes/DukeException.java +++ b/src/main/java/Dukes/Exceptions/DukeException.java @@ -1,4 +1,4 @@ -package Dukes; +package Dukes.Exceptions; /** * Represents a checked exception. * A DukeException object corresponds to an exception that is thrown when user inputs are invalid or diff --git a/src/main/java/Dukes/FileNotFoundException.java b/src/main/java/Dukes/Exceptions/FileNotFoundException.java similarity index 67% rename from src/main/java/Dukes/FileNotFoundException.java rename to src/main/java/Dukes/Exceptions/FileNotFoundException.java index c935762a..fa909f73 100644 --- a/src/main/java/Dukes/FileNotFoundException.java +++ b/src/main/java/Dukes/Exceptions/FileNotFoundException.java @@ -1,10 +1,13 @@ -package Dukes; +package Dukes.Exceptions; + +import Dukes.Exceptions.DukeException; + /** * Represents a checked exception. * A FileNotFoundException object corresponds to an exception that is thrown where file are invalid or * have some issues. */ -public class FileNotFoundException extends DukeException{ +public class FileNotFoundException extends DukeException { public FileNotFoundException(String message) { super(message); } diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 20c8212d..b8476721 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -1,5 +1,6 @@ package Dukes; +import Dukes.Exceptions.DukeException; import Dukes.command.AddCommand; import Dukes.command.DeleteCommand; import Dukes.command.DoneCommand; diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index 73c06989..c67fbac2 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -18,7 +18,7 @@ public Storage(String filepath) { this.filePath = filePath; } - public ArrayList load() throws Dukes.FileNotFoundException { + public ArrayList load() throws Dukes.Exceptions.FileNotFoundException { try { File file = new File(filePath); file.createNewFile(); @@ -34,7 +34,7 @@ public ArrayList load() throws Dukes.FileNotFoundException { } else if (strArr[0].equals("E")) { tasks = new Event(strArr[2], strArr[3]); } else { - throw new Dukes.FileNotFoundException("Previous Tasks are corrupted. Please resetting your task . ."); + throw new Dukes.Exceptions.FileNotFoundException("Previous Tasks are corrupted. Please resetting your task . ."); } if (strArr[1].equals("1")) { tasks.markAsDone(); diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java index ad28c028..37a30667 100644 --- a/src/main/java/Dukes/command/Command.java +++ b/src/main/java/Dukes/command/Command.java @@ -4,7 +4,7 @@ import Dukes.Task; import Dukes.TaskList; import Dukes.Ui; -import Dukes.DukeException; +import Dukes.Exceptions.DukeException; /** * Represents a command. * Parent class of all other types of commands to perform some action. diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java index c9c5957d..3c668918 100644 --- a/src/main/java/Dukes/command/DeleteCommand.java +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -4,7 +4,7 @@ import Dukes.TaskList; import Dukes.Task; import Dukes.Ui; -import Dukes.DukeException; +import Dukes.Exceptions.DukeException; /** * Create a DeleteCommand. It removes user's task from the list. */ diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java index ddafd76a..0c9ef25b 100644 --- a/src/main/java/Dukes/command/DoneCommand.java +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -4,7 +4,7 @@ import Dukes.TaskList; import Dukes.Task; import Dukes.Ui; -import Dukes.DukeException; +import Dukes.Exceptions.DukeException; /** * Represents a done command. From c5cf5fb11058eb279daa20d063b89ef4b873c212 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 19:28:24 +0800 Subject: [PATCH 35/94] edit --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index dbd50720..b01fafc8 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -26,7 +26,7 @@ public Duke(String path) { try { tasks = new TaskList(storage.load()); } catch ( DukeException e ) { - ui.printLoadingError("Problem reading file. Starting with an empty task list"); + ui.printLoadingError("Problem reading file. Starting with an empty task list."); tasks = new TaskList(); } } From 7527ec0797a47b6cd38df844132f83adcdf52cf5 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 20:33:44 +0800 Subject: [PATCH 36/94] jar file --- src/main/java/META-INF/MANIFEST.MF | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/main/java/META-INF/MANIFEST.MF diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..3b0baec5 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: Dukes.Duke + From b803bc501a1c972e8e4a006480546efdabc4edc2 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 20:56:27 +0800 Subject: [PATCH 37/94] add duke.txt --- data/duke.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 data/duke.txt diff --git a/data/duke.txt b/data/duke.txt new file mode 100644 index 00000000..0b1e5edf --- /dev/null +++ b/data/duke.txt @@ -0,0 +1,4 @@ +T | 1 | read book +D | 0 | return book | June 6th +E | 0 | project meeting | Aug 6th 2-4pm +T | 1 | join sports club From 7845cda1af1ea5fb275b3e9720f633250c14bc60 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 21:04:29 +0800 Subject: [PATCH 38/94] nothing --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index b01fafc8..b53f1b93 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -55,7 +55,7 @@ public void run() { } } /** - * This is Main method which made use of Duke and run methods + * This is main method which made use of Duke and run methods */ public static void main(String[] args){ assert (args.length) > 0; From c33605c5d3918df836ffbd2bce9a300e24bd3b8f Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 21:11:30 +0800 Subject: [PATCH 39/94] more OOP --- data/duke.txt | 5 +---- src/main/java/Dukes/Duke.java | 1 + src/main/java/Dukes/Parser.java | 4 ++++ src/main/java/Dukes/Storage.java | 5 +++++ src/main/java/Dukes/{ => Tasks}/Deadline.java | 2 +- src/main/java/Dukes/{ => Tasks}/Event.java | 3 ++- src/main/java/Dukes/{ => Tasks}/Task.java | 2 +- src/main/java/Dukes/{ => Tasks}/TaskList.java | 3 ++- src/main/java/Dukes/{ => Tasks}/ToDo.java | 2 +- src/main/java/Dukes/Ui.java | 2 ++ src/main/java/Dukes/command/AddCommand.java | 4 ++-- src/main/java/Dukes/command/Command.java | 4 ++-- src/main/java/Dukes/command/DeleteCommand.java | 4 ++-- src/main/java/Dukes/command/DoneCommand.java | 4 ++-- src/main/java/Dukes/command/ExitCommand.java | 2 +- src/main/java/Dukes/command/ListCommand.java | 2 +- 16 files changed, 30 insertions(+), 19 deletions(-) rename src/main/java/Dukes/{ => Tasks}/Deadline.java (96%) rename src/main/java/Dukes/{ => Tasks}/Event.java (95%) rename src/main/java/Dukes/{ => Tasks}/Task.java (98%) rename src/main/java/Dukes/{ => Tasks}/TaskList.java (94%) rename src/main/java/Dukes/{ => Tasks}/ToDo.java (95%) diff --git a/data/duke.txt b/data/duke.txt index 0b1e5edf..cc22b292 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,4 +1 @@ -T | 1 | read book -D | 0 | return book | June 6th -E | 0 | project meeting | Aug 6th 2-4pm -T | 1 | join sports club +T | 0 | sda diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index b53f1b93..a29f57dc 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -1,5 +1,6 @@ package Dukes; import Dukes.Exceptions.DukeException; +import Dukes.Tasks.TaskList; import Dukes.command.Command; diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index b8476721..7c083abf 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -1,6 +1,10 @@ package Dukes; import Dukes.Exceptions.DukeException; +import Dukes.Tasks.Deadline; +import Dukes.Tasks.Event; +import Dukes.Tasks.Task; +import Dukes.Tasks.ToDo; import Dukes.command.AddCommand; import Dukes.command.DeleteCommand; import Dukes.command.DoneCommand; diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index c67fbac2..0427e634 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -1,5 +1,10 @@ package Dukes; +import Dukes.Tasks.Deadline; +import Dukes.Tasks.Event; +import Dukes.Tasks.Task; +import Dukes.Tasks.ToDo; + import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; diff --git a/src/main/java/Dukes/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java similarity index 96% rename from src/main/java/Dukes/Deadline.java rename to src/main/java/Dukes/Tasks/Deadline.java index 8da576f2..f486be7b 100644 --- a/src/main/java/Dukes/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -1,4 +1,4 @@ -package Dukes; +package Dukes.Tasks; /** * deadline task description /by deadline description: add to the task list a deadline task with the given task diff --git a/src/main/java/Dukes/Event.java b/src/main/java/Dukes/Tasks/Event.java similarity index 95% rename from src/main/java/Dukes/Event.java rename to src/main/java/Dukes/Tasks/Event.java index 345ebb8c..b2f5e125 100644 --- a/src/main/java/Dukes/Event.java +++ b/src/main/java/Dukes/Tasks/Event.java @@ -1,4 +1,5 @@ -package Dukes; +package Dukes.Tasks; + /** * Represents an event task. */ diff --git a/src/main/java/Dukes/Task.java b/src/main/java/Dukes/Tasks/Task.java similarity index 98% rename from src/main/java/Dukes/Task.java rename to src/main/java/Dukes/Tasks/Task.java index ba7f3872..32709996 100644 --- a/src/main/java/Dukes/Task.java +++ b/src/main/java/Dukes/Tasks/Task.java @@ -1,4 +1,4 @@ -package Dukes; +package Dukes.Tasks; /** * Represents a Task. diff --git a/src/main/java/Dukes/TaskList.java b/src/main/java/Dukes/Tasks/TaskList.java similarity index 94% rename from src/main/java/Dukes/TaskList.java rename to src/main/java/Dukes/Tasks/TaskList.java index e51b133f..bbcd3dd9 100644 --- a/src/main/java/Dukes/TaskList.java +++ b/src/main/java/Dukes/Tasks/TaskList.java @@ -1,4 +1,5 @@ -package Dukes; +package Dukes.Tasks; + import java.util.ArrayList; diff --git a/src/main/java/Dukes/ToDo.java b/src/main/java/Dukes/Tasks/ToDo.java similarity index 95% rename from src/main/java/Dukes/ToDo.java rename to src/main/java/Dukes/Tasks/ToDo.java index b1139485..fb929cbf 100644 --- a/src/main/java/Dukes/ToDo.java +++ b/src/main/java/Dukes/Tasks/ToDo.java @@ -1,4 +1,4 @@ -package Dukes; +package Dukes.Tasks; /** * Represents a todo task. diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index 4dfa0461..6c1e388b 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -1,5 +1,7 @@ package Dukes; +import Dukes.Tasks.Task; + import java.util.ArrayList; import java.util.Scanner; diff --git a/src/main/java/Dukes/command/AddCommand.java b/src/main/java/Dukes/command/AddCommand.java index c6b3ec76..d62733d0 100644 --- a/src/main/java/Dukes/command/AddCommand.java +++ b/src/main/java/Dukes/command/AddCommand.java @@ -1,8 +1,8 @@ package Dukes.command; import Dukes.Storage; -import Dukes.Task; -import Dukes.TaskList; +import Dukes.Tasks.Task; +import Dukes.Tasks.TaskList; import Dukes.Ui; /** * Create an AddCommand. It adds tasks to user's list. diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java index 37a30667..265fb9f3 100644 --- a/src/main/java/Dukes/command/Command.java +++ b/src/main/java/Dukes/command/Command.java @@ -1,8 +1,8 @@ package Dukes.command; import Dukes.Storage; -import Dukes.Task; -import Dukes.TaskList; +import Dukes.Tasks.Task; +import Dukes.Tasks.TaskList; import Dukes.Ui; import Dukes.Exceptions.DukeException; /** diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java index 3c668918..90f62aa9 100644 --- a/src/main/java/Dukes/command/DeleteCommand.java +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -1,8 +1,8 @@ package Dukes.command; import Dukes.Storage; -import Dukes.TaskList; -import Dukes.Task; +import Dukes.Tasks.TaskList; +import Dukes.Tasks.Task; import Dukes.Ui; import Dukes.Exceptions.DukeException; /** diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java index 0c9ef25b..a8163625 100644 --- a/src/main/java/Dukes/command/DoneCommand.java +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -1,8 +1,8 @@ package Dukes.command; import Dukes.Storage; -import Dukes.TaskList; -import Dukes.Task; +import Dukes.Tasks.TaskList; +import Dukes.Tasks.Task; import Dukes.Ui; import Dukes.Exceptions.DukeException; diff --git a/src/main/java/Dukes/command/ExitCommand.java b/src/main/java/Dukes/command/ExitCommand.java index e98dc734..e469336f 100644 --- a/src/main/java/Dukes/command/ExitCommand.java +++ b/src/main/java/Dukes/command/ExitCommand.java @@ -1,7 +1,7 @@ package Dukes.command; import Dukes.Storage; -import Dukes.TaskList; +import Dukes.Tasks.TaskList; import Dukes.Ui; /** * Create an ExitCommand. It ends and exit the programme and stores user's tasks. diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java index 31946377..3ecc7497 100644 --- a/src/main/java/Dukes/command/ListCommand.java +++ b/src/main/java/Dukes/command/ListCommand.java @@ -1,7 +1,7 @@ package Dukes.command; import Dukes.Storage; -import Dukes.TaskList; +import Dukes.Tasks.TaskList; import Dukes.Ui; /** * Create a ListCommand. It lists all tasks for users. From 97313c2bbee06718ba2a14bd9a9e7018fcbc05dd Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 23:46:46 +0800 Subject: [PATCH 40/94] add time and date for deadline and event --- src/main/java/Dukes/Parser.java | 232 +++++++++--------------- src/main/java/Dukes/Storage.java | 2 + src/main/java/Dukes/Tasks/Deadline.java | 14 +- src/main/java/Dukes/Ui.java | 4 + 4 files changed, 106 insertions(+), 146 deletions(-) diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 7c083abf..fe8d89f8 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -12,12 +12,18 @@ import Dukes.command.Command; import Dukes.command.ListCommand; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.Date; + /** * Parser program containing methods that deals with parsing the user command to extract meaningful details from it. */ public class Parser { /** * Processes the user input and creates the corresponding commands. + * * @param input Command input by user. * @return Corresponding command that is input by user. * @throws DukeExceptionIf a new command cannot be created due to invalid input parameters. @@ -25,153 +31,91 @@ public class Parser { public static Command parse(String input) throws DukeException { Task taskWord; - Command c; + Command c = null; String action = input.split(" ")[0].toLowerCase(); - switch (action) { - case "list": - c = new ListCommand(); - break; - - case "todo": - if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); - } - taskWord = new ToDo(input.substring(5)); - c = new AddCommand(taskWord); - break; - - case "delete": - if (input.isEmpty() || input.length() < 7) { - throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); - } - int toDelete = Ui.indexDetails(input); - c = new DeleteCommand(toDelete); - break; - - case "done": - if (input.length() < 6) { - throw new DukeException("please key in correct format.\n"); - } - int toEdit = Ui.indexDetails(input); - c = new DoneCommand(toEdit); - break; - - case "deadline": - if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); - } - String[] splitDetail = input.split("/by"); - if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); - } - String task = splitDetail[0].substring(9); - String by = splitDetail[1]; - taskWord = new Deadline(task, by); - c = new AddCommand(taskWord); - break; - - case "event": - if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); - } - String[] splitEvent = input.split("/at"); - if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); - } - String event = splitEvent[0].substring(7); - String time = splitEvent[1]; - taskWord = new Event(event, time); - c = new AddCommand(taskWord); - break; - - case "bye": - case "exit": - c = new ExitCommand(); - break; - - default: - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); - } - return c; - } -} - - - - - /* private static Command list() { - return new ListCommand(); - } - private void addCommandTask(String input) { - Task taskWord; + SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy HHmm"); + SimpleDateFormat formatter = new SimpleDateFormat("dd MMM yyyy, hh:mm a"); try { - if (input.startsWith("todo") && input.contains(" ")) { - - addTask(taskWord); - } else if (input.startsWith("deadline") && input.contains(" ")) { - if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); - } - String[] splitDetail = input.split("/by"); - if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); - } - String task = splitDetail[0]; - String by = splitDetail[1]; - taskWord = new Deadline(task, by); - //taskWord = new Deadline(task, Deadline.timeChange(by)); - addTaskCase(taskWord); - } else if (input.startsWith("event") && input.contains(" ")) { - if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); - } - String[] splitEvent = input.split("/at"); - if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); - } - String event = splitEvent[0]; - String time = splitEvent[1]; - taskWord = new Event(event, time); - addTaskCase(taskWord); - } else if(input.startsWith("delete") && input.contains(" ")){ - if(tasks.isEmpty() || input.length() < 7) { - throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); - } - int toDelete = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; - Task task = tasks.getTask(toDelete); - tasks.deleteTask(toDelete); - System.out.println("Noted, I've removed the following task:\n" - + " " - + task - + "\n" - + "Now you have " - + tasks.getSize() - + " tasks in the list."); - } else if (input.startsWith("done") && input.contains(" ")) { - if (input.length() < 6) { - throw new DukeException("please key in correct format.\n"); - } - else if(tasks.isEmpty()){ - throw new DukeException("There is no task need to be done\n"); - } - int toEdit = Integer.parseInt(input.substring(input.indexOf(' ') + 1)) - 1; - Task task = tasks.getTask(toEdit); - task.setDone(); - System.out.println(" Nice! I've marked this task as done:\n" - + task - + "\n" - + "___________________________________________________________________\n"); - }else{ - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + switch (action) { + case "list": + c = new ListCommand(); + break; + + case "todo": + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); + } + taskWord = new ToDo(input.substring(5)); + c = new AddCommand(taskWord); + break; + + case "delete": + if (input.isEmpty() || input.length() < 7) { + throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); + } + int toDelete = Ui.indexDetails(input); + c = new DeleteCommand(toDelete); + break; + + case "done": + if (input.length() < 6) { + throw new DukeException("please key in correct format.\n"); + } + int toEdit = Ui.indexDetails(input); + c = new DoneCommand(toEdit); + break; + + case "deadline": + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); + } + String task = splitDetail[0].substring(9); + String by = splitDetail[1]; + Date byDeadline = format.parse(by); + try { + taskWord = new Deadline(task, formatter.format(byDeadline)); + }catch (Exception e){ + throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); + } + c = new AddCommand(taskWord); + break; + + case "event": + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0].substring(7); + String time = splitEvent[1]; + Date timeEvent = format.parse(time); + try { + taskWord = new Event(event, formatter.format(timeEvent)); + }catch(Exception e){ + throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); + } + c = new AddCommand(taskWord); + break; + + case "bye": + case "exit": + c = new ExitCommand(); + break; + + default: + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); } - }catch (DukeException e) { - System.out.print(e.getMessage()); - } catch (Exception e) { - assert false : "Uncaught exception"; - System.out.println("Please input a date in this format : dd/MM/yy HHmm"); + return c; + } catch(Exception e){ + e.printStackTrace(); } - + return c; } +} - -}*/ diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index 0427e634..eee37927 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -9,6 +9,8 @@ import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Scanner; diff --git a/src/main/java/Dukes/Tasks/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java index f486be7b..d2d1754a 100644 --- a/src/main/java/Dukes/Tasks/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -1,5 +1,13 @@ package Dukes.Tasks; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Date; + /** * deadline task description /by deadline description: add to the task list a deadline task with the given task * description and with the deadline description @@ -10,14 +18,16 @@ public class Deadline extends Task { protected String by; + public Deadline(String description, String by) { super(description); - this.by = by; + this.by= by; } + @Override public String toString() { - return "[D]" + super.toString() + "(by:" + by + ")"; + return "[D]" + super.toString() + "(by:" + by + ")"; } @Override diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index 6c1e388b..1e7dcf5c 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -2,7 +2,10 @@ import Dukes.Tasks.Task; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.Scanner; /** @@ -89,5 +92,6 @@ public void printDoneMessage(Task task) { System.out.println("Nice! I've marked this task as done:\n" + task); } + } From ed3aa0f12af3d8631fcbb4708eb7a48a275f304e Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 23:50:51 +0800 Subject: [PATCH 41/94] handle error for time and date in deadline and event --- src/main/java/Dukes/Parser.java | 136 ++++++++++++------------ src/main/java/Dukes/Tasks/Deadline.java | 7 -- src/main/java/Dukes/Ui.java | 3 - 3 files changed, 66 insertions(+), 80 deletions(-) diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index fe8d89f8..848d974b 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -35,87 +35,83 @@ public static Command parse(String input) throws DukeException { String action = input.split(" ")[0].toLowerCase(); SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy HHmm"); SimpleDateFormat formatter = new SimpleDateFormat("dd MMM yyyy, hh:mm a"); - try { - switch (action) { - case "list": - c = new ListCommand(); - break; + switch (action) { + case "list": + c = new ListCommand(); + break; - case "todo": - if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); - } - taskWord = new ToDo(input.substring(5)); - c = new AddCommand(taskWord); - break; + case "todo": + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); + } + taskWord = new ToDo(input.substring(5)); + c = new AddCommand(taskWord); + break; - case "delete": - if (input.isEmpty() || input.length() < 7) { - throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); - } - int toDelete = Ui.indexDetails(input); - c = new DeleteCommand(toDelete); - break; + case "delete": + if (input.isEmpty() || input.length() < 7) { + throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); + } + int toDelete = Ui.indexDetails(input); + c = new DeleteCommand(toDelete); + break; - case "done": - if (input.length() < 6) { - throw new DukeException("please key in correct format.\n"); - } - int toEdit = Ui.indexDetails(input); - c = new DoneCommand(toEdit); - break; + case "done": + if (input.length() < 6) { + throw new DukeException("please key in correct format.\n"); + } + int toEdit = Ui.indexDetails(input); + c = new DoneCommand(toEdit); + break; - case "deadline": - if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); - } - String[] splitDetail = input.split("/by"); - if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); - } - String task = splitDetail[0].substring(9); - String by = splitDetail[1]; + case "deadline": + if (input.length() < 10) { + throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } + String[] splitDetail = input.split("/by"); + if (splitDetail.length < 2) { + throw new DukeException("Please specify the deadline time\n"); + } + String task = splitDetail[0].substring(9); + String by = splitDetail[1]; + try { Date byDeadline = format.parse(by); - try { - taskWord = new Deadline(task, formatter.format(byDeadline)); - }catch (Exception e){ - throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); - } - c = new AddCommand(taskWord); - break; + taskWord = new Deadline(task, formatter.format(byDeadline)); + }catch (Exception e){ + throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); + } + c = new AddCommand(taskWord); + break; - case "event": - if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); - } - String[] splitEvent = input.split("/at"); - if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); - } - String event = splitEvent[0].substring(7); - String time = splitEvent[1]; + case "event": + if (input.length() < 7) { + throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + } + String[] splitEvent = input.split("/at"); + if (splitEvent.length < 2) { + throw new DukeException("Please specify the event time\n"); + } + String event = splitEvent[0].substring(7); + String time = splitEvent[1]; + try { Date timeEvent = format.parse(time); - try { - taskWord = new Event(event, formatter.format(timeEvent)); - }catch(Exception e){ - throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); - } - c = new AddCommand(taskWord); - break; + taskWord = new Event(event, formatter.format(timeEvent)); + }catch(Exception e){ + throw new DukeException("Please input a date in this format : dd/MM/yyyy HHmm"); + } + c = new AddCommand(taskWord); + break; - case "bye": - case "exit": - c = new ExitCommand(); - break; + case "bye": + case "exit": + c = new ExitCommand(); + break; - default: - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); - } - return c; - } catch(Exception e){ - e.printStackTrace(); + default: + throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); } return c; } + } diff --git a/src/main/java/Dukes/Tasks/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java index d2d1754a..671ba062 100644 --- a/src/main/java/Dukes/Tasks/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -1,12 +1,5 @@ package Dukes.Tasks; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; /** * deadline task description /by deadline description: add to the task list a deadline task with the given task diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index 1e7dcf5c..547c39ab 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -2,10 +2,7 @@ import Dukes.Tasks.Task; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Date; import java.util.Scanner; /** From f9e7d482e4d612219badec3aa3cddb4a5a016b2c Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 14 Sep 2020 23:51:14 +0800 Subject: [PATCH 42/94] handle error for time and date in deadline and event --- src/main/java/Dukes/Storage.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index eee37927..0427e634 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -9,8 +9,6 @@ import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Scanner; From 3b3b457e34456851623b6c24c2e1d4e2065937fc Mon Sep 17 00:00:00 2001 From: linqing42 Date: Fri, 18 Sep 2020 23:01:25 +0800 Subject: [PATCH 43/94] update --- data/duke.txt | 2 +- src/main/java/Dukes/Parser.java | 2 +- src/main/java/Dukes/Tasks/Event.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index cc22b292..8b137891 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1 +1 @@ -T | 0 | sda + diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 848d974b..2e2710e5 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -91,7 +91,7 @@ public static Command parse(String input) throws DukeException { if (splitEvent.length < 2) { throw new DukeException("Please specify the event time\n"); } - String event = splitEvent[0].substring(7); + String event = splitEvent[0].substring(6); String time = splitEvent[1]; try { Date timeEvent = format.parse(time); diff --git a/src/main/java/Dukes/Tasks/Event.java b/src/main/java/Dukes/Tasks/Event.java index b2f5e125..baa31e57 100644 --- a/src/main/java/Dukes/Tasks/Event.java +++ b/src/main/java/Dukes/Tasks/Event.java @@ -1,7 +1,7 @@ package Dukes.Tasks; /** - * Represents an event task. + * Represents an event task that start at a specific date and time. eg. event join team /at 12/12/2019 1800. */ public class Event extends Task { protected String at; From 77022d63883fd2a1e309a1201e138cbc2b65b56d Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 18:20:51 +0800 Subject: [PATCH 44/94] add find task --- data/duke.txt | 4 +- src/main/java/Dukes/Parser.java | 19 ++++--- src/main/java/Dukes/Tasks/Deadline.java | 5 +- src/main/java/Dukes/Tasks/Task.java | 8 +++ src/main/java/Dukes/Tasks/TaskList.java | 1 + src/main/java/Dukes/Tasks/ToDo.java | 2 +- src/main/java/Dukes/Ui.java | 1 + src/main/java/Dukes/command/AddCommand.java | 9 ++-- src/main/java/Dukes/command/Command.java | 2 + .../java/Dukes/command/DeleteCommand.java | 14 +++--- src/main/java/Dukes/command/DoneCommand.java | 2 +- src/main/java/Dukes/command/ExitCommand.java | 5 +- src/main/java/Dukes/command/FindCommand.java | 49 +++++++++++++++++++ src/main/java/Dukes/command/ListCommand.java | 2 +- 14 files changed, 94 insertions(+), 29 deletions(-) create mode 100644 src/main/java/Dukes/command/FindCommand.java diff --git a/data/duke.txt b/data/duke.txt index 8b137891..c2b6b8ba 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1 +1,3 @@ - +T | 0 | read book +D | 0 | borrow book | 12 Dec 2019, 06:00 PM +E | 0 | joint club | 12 Dec 2019, 06:00 PM diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 2e2710e5..814f9ed9 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -5,12 +5,7 @@ import Dukes.Tasks.Event; import Dukes.Tasks.Task; import Dukes.Tasks.ToDo; -import Dukes.command.AddCommand; -import Dukes.command.DeleteCommand; -import Dukes.command.DoneCommand; -import Dukes.command.ExitCommand; -import Dukes.command.Command; -import Dukes.command.ListCommand; +import Dukes.command.*; import java.text.SimpleDateFormat; import java.time.LocalDate; @@ -31,6 +26,7 @@ public class Parser { public static Command parse(String input) throws DukeException { Task taskWord; + String keyword; Command c = null; String action = input.split(" ")[0].toLowerCase(); SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy HHmm"); @@ -101,6 +97,17 @@ public static Command parse(String input) throws DukeException { } c = new AddCommand(taskWord); break; + case "find": + if (input.length() < 6) { + throw new DukeException("☹ OOPS!!! The description of a find cannot be empty.\n"); + } + try { + keyword = input.substring(5).toLowerCase(); + c = new FindCommand(keyword); + break; + } catch (NumberFormatException e) { + throw new DukeException("please key in correct format"); + } case "bye": case "exit": diff --git a/src/main/java/Dukes/Tasks/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java index 671ba062..6c87756e 100644 --- a/src/main/java/Dukes/Tasks/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -2,11 +2,8 @@ /** - * deadline task description /by deadline description: add to the task list a deadline task with the given task - * description and with the deadline description + * deadline task description /by specific date and time e.g. return book by 12/12/2019 1800. * - * @inheritDoc - */ public class Deadline extends Task { protected String by; diff --git a/src/main/java/Dukes/Tasks/Task.java b/src/main/java/Dukes/Tasks/Task.java index 32709996..eb6aaa07 100644 --- a/src/main/java/Dukes/Tasks/Task.java +++ b/src/main/java/Dukes/Tasks/Task.java @@ -33,6 +33,14 @@ public Task markAsDone() { this.isDone = true; return this; } + /** + * Get the description of the task + * + * @return the description of the task + */ + public String getDescription() { + return this.description; + } @Override public String toString() { diff --git a/src/main/java/Dukes/Tasks/TaskList.java b/src/main/java/Dukes/Tasks/TaskList.java index bbcd3dd9..14716132 100644 --- a/src/main/java/Dukes/Tasks/TaskList.java +++ b/src/main/java/Dukes/Tasks/TaskList.java @@ -10,6 +10,7 @@ public class TaskList { protected ArrayList tasks = new ArrayList(100); public ArrayList list = new ArrayList(); + public TaskList() { } diff --git a/src/main/java/Dukes/Tasks/ToDo.java b/src/main/java/Dukes/Tasks/ToDo.java index fb929cbf..a527391c 100644 --- a/src/main/java/Dukes/Tasks/ToDo.java +++ b/src/main/java/Dukes/Tasks/ToDo.java @@ -2,7 +2,7 @@ /** * Represents a todo task. - * An Todoobject corresponds to a type of Task object with a task to be completed. + * An ToDoobject corresponds to a type of Task object with a task to be completed. */ public class ToDo extends Task { diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index 547c39ab..c6daee06 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -1,6 +1,7 @@ package Dukes; import Dukes.Tasks.Task; +import Dukes.Tasks.TaskList; import java.util.ArrayList; import java.util.Scanner; diff --git a/src/main/java/Dukes/command/AddCommand.java b/src/main/java/Dukes/command/AddCommand.java index d62733d0..bffe02e8 100644 --- a/src/main/java/Dukes/command/AddCommand.java +++ b/src/main/java/Dukes/command/AddCommand.java @@ -5,7 +5,7 @@ import Dukes.Tasks.TaskList; import Dukes.Ui; /** - * Create an AddCommand. It adds tasks to user's list. + * Create an AddCommand. It will add a Deadline, Event, todo task to the user list and save it. */ public class AddCommand extends Command { public AddCommand(Task task) { @@ -13,11 +13,10 @@ public AddCommand(Task task) { } /** - * Adds a single task to user's list. - * - * @param tasks TaskList to be appended. + * Adds a Deadline/ Event/ Todo task to the task list and save the list to disk and display to user + * @param tasks TaskList to be appended. * @param ui UI to interact with user. - * @param storage Storage to read and write files and temporary store in hard disk. + * @param storage Storage to read and write files,temporary save and store in hard disk. */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) { diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java index 265fb9f3..99981744 100644 --- a/src/main/java/Dukes/command/Command.java +++ b/src/main/java/Dukes/command/Command.java @@ -13,6 +13,8 @@ public abstract class Command { protected Task task; protected int index; + protected String keyWord; + public abstract void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException; diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java index 90f62aa9..bcc3a10c 100644 --- a/src/main/java/Dukes/command/DeleteCommand.java +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -8,15 +8,16 @@ /** * Create a DeleteCommand. It removes user's task from the list. */ -public class DeleteCommand extends Command{ - public DeleteCommand (int index){ - super.index =index; +public class DeleteCommand extends Command { + public DeleteCommand(int index) { + super.index = index; } + /** - * Adds a delete task to user's list. + * Adds a delete task from list with a specific index if index is valid, save the task to user's list. * - * @param tasks TaskList to be appended. - * @param ui UI to interact with user. + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. * @param storage Storage to read and write files and temporary store in hard disk. * @throws DukeException If user key in a number that is not in the TaskList. */ @@ -29,5 +30,4 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException throw new DukeException("Please key in a number from the list"); } } - } diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java index a8163625..f59cb03a 100644 --- a/src/main/java/Dukes/command/DoneCommand.java +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -20,7 +20,7 @@ public DoneCommand(int index) { super.index = index; } /** - * Adds a done task to user's list. + * Mark a task in the task list as done if specified index is valid, save the task list and display to user * * @param tasks TaskList to be appended. * @param ui UI to interact with user. diff --git a/src/main/java/Dukes/command/ExitCommand.java b/src/main/java/Dukes/command/ExitCommand.java index e469336f..77aea947 100644 --- a/src/main/java/Dukes/command/ExitCommand.java +++ b/src/main/java/Dukes/command/ExitCommand.java @@ -8,9 +8,8 @@ */ public class ExitCommand extends Command { /** - * Saves the tasks into storage and ends the programme. - * - * @param tasks TaskList to be appended. + * Saves the tasks into storage and display bye message to the user. + * @param tasks TaskList to be appended. * @param ui UI to interact with user. * @param storage Storage to read and write files and temporary store in hard disk. */ diff --git a/src/main/java/Dukes/command/FindCommand.java b/src/main/java/Dukes/command/FindCommand.java new file mode 100644 index 00000000..73da20bf --- /dev/null +++ b/src/main/java/Dukes/command/FindCommand.java @@ -0,0 +1,49 @@ +package Dukes.command; + +import Dukes.Exceptions.DukeException; +import Dukes.Storage; +import Dukes.Tasks.Task; +import Dukes.Tasks.TaskList; +import Dukes.Ui; + + +/** + * Creates a FindCommand. It search for tasks when given keyword. + */ +public class FindCommand extends Command { + public FindCommand(String keyWord) { + this.keyWord = keyWord; + } + /** + * Finds the tasks with the given keyword. + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. + * @param storage Storage to read and write files. + */ + + @Override + public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { + TaskList filteredTasks = new TaskList(); + int count =0; + try { + for (Task task :tasks.list) { + String description = task.getDescription().toLowerCase(); + if (description.contains(keyWord)) { + filteredTasks.list.add(task); + } + } + if (tasks.isEmpty() || count ==0) { + throw new DukeException("There is no task in the list"); + } else { + System.out.println("Here are the matching tasks in your list:"); + for (int i = 0; i < filteredTasks.list.size(); i++) { + System.out.println((i + 1) + "." + filteredTasks.list.get(i)); + } + } + } catch (IndexOutOfBoundsException e) { + System.out.print("current task is empty in your list."); + } + } +} + + diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java index 3ecc7497..0311a13c 100644 --- a/src/main/java/Dukes/command/ListCommand.java +++ b/src/main/java/Dukes/command/ListCommand.java @@ -14,7 +14,7 @@ public ListCommand() { super(); } /** - * print commands detail into the TaskList. + * List all the tasks in the task list that was saved on the disk, and display to user * @param tasks TaskList to be appended. * @param ui UI to interact with user. * @param storage Storage to read and write files and temporary store in hard disk. From db9c39a0efd6ce9c077aa73cba7e80004dc940aa Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 18:25:16 +0800 Subject: [PATCH 45/94] update --- data/duke.txt | 2 -- src/main/java/Dukes/Storage.java | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index c2b6b8ba..02001733 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,3 +1 @@ T | 0 | read book -D | 0 | borrow book | 12 Dec 2019, 06:00 PM -E | 0 | joint club | 12 Dec 2019, 06:00 PM diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/Storage.java index 0427e634..321d87f8 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/Storage.java @@ -16,11 +16,10 @@ * Represents a storage in the hard disk. */ public class Storage { - private ArrayList details = new ArrayList(); + private ArrayList details = new ArrayList<>(); public static String filePath = "data/duke.txt"; - public Storage(String filepath) { - this.filePath = filePath; + public Storage(String path) { } public ArrayList load() throws Dukes.Exceptions.FileNotFoundException { From 12f46fec7219fb050b610a6ba10e4c8162901c52 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 21:19:12 +0800 Subject: [PATCH 46/94] add JUnit test --- data/duke.txt | 2 +- src/main/java/Dukes/Parser.java | 2 +- src/main/java/Dukes/Tasks/Deadline.java | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index 02001733..10cf9e16 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1 +1 @@ -T | 0 | read book +D | 0 | borrow book | 12 Dec 2019, 06:00 PM diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/Parser.java index 814f9ed9..ba978c6c 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/Parser.java @@ -66,7 +66,7 @@ public static Command parse(String input) throws DukeException { } String[] splitDetail = input.split("/by"); if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline time\n"); + throw new DukeException("Please specify the deadline date and time\n"); } String task = splitDetail[0].substring(9); String by = splitDetail[1]; diff --git a/src/main/java/Dukes/Tasks/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java index 6c87756e..fedadfdf 100644 --- a/src/main/java/Dukes/Tasks/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -1,6 +1,9 @@ package Dukes.Tasks; +import java.text.SimpleDateFormat; +import java.util.Date; + /** * deadline task description /by specific date and time e.g. return book by 12/12/2019 1800. * @@ -14,7 +17,6 @@ public Deadline(String description, String by) { this.by= by; } - @Override public String toString() { return "[D]" + super.toString() + "(by:" + by + ")"; From 14985ba0112e367a72376f50bd80ba11720c9087 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 21:21:16 +0800 Subject: [PATCH 47/94] add JUnit test --- src/test/Dukes/DukeTest.java | 12 ++++++++++++ src/test/Dukes/ParserTest.java | 33 +++++++++++++++++++++++++++++++++ src/test/Dukes/ToDoTest.java | 17 +++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 src/test/Dukes/DukeTest.java create mode 100644 src/test/Dukes/ParserTest.java create mode 100644 src/test/Dukes/ToDoTest.java diff --git a/src/test/Dukes/DukeTest.java b/src/test/Dukes/DukeTest.java new file mode 100644 index 00000000..064aff05 --- /dev/null +++ b/src/test/Dukes/DukeTest.java @@ -0,0 +1,12 @@ +package Dukes; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class DukeTest { + @Test + public void dummyTest() { + assertEquals(2, 2); + } +} diff --git a/src/test/Dukes/ParserTest.java b/src/test/Dukes/ParserTest.java new file mode 100644 index 00000000..d11e4eb2 --- /dev/null +++ b/src/test/Dukes/ParserTest.java @@ -0,0 +1,33 @@ +package Dukes; + + +import Dukes.command.*; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class ParserTest { + @Test + public void parseExit() { + Parser exit = new Parser(); + Command command; + try { + command = Parser.parse("exit"); + assertTrue(command instanceof ExitCommand); + } catch (Exception e) { + fail("Should not shown thrown Exception."); + } + } + @Test + public void parseBye() { + Parser bye = new Parser(); + Command command; + try { + command = Parser.parse("bye"); + assertTrue(command instanceof ExitCommand); + } catch (Exception e) { + fail("Should not shown thrown Exception."); + } + } + +} diff --git a/src/test/Dukes/ToDoTest.java b/src/test/Dukes/ToDoTest.java new file mode 100644 index 00000000..24448a28 --- /dev/null +++ b/src/test/Dukes/ToDoTest.java @@ -0,0 +1,17 @@ +package Dukes; + +import Dukes.Tasks.ToDo; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class ToDoTest { + @Test + public void ToDoTest() { + ToDo todo = new ToDo("return book"); + assertEquals("[T][✘] return book", todo.toString()); + assertEquals("T | 0 | return book", todo.toWriteFile()); + } + +} + From 4732d8978d62b2969769fe5348dd7cdedde9c859 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 21:36:53 +0800 Subject: [PATCH 48/94] latest update --- data/duke.txt | 3 ++ src/main/java/Dukes/command/FindCommand.java | 29 +++++++++++--------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index 10cf9e16..0f441f45 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1 +1,4 @@ +T | 0 | read book D | 0 | borrow book | 12 Dec 2019, 06:00 PM +E | 1 | return book | 12 Jan 2020, 05:00 PM +T | 0 | join club diff --git a/src/main/java/Dukes/command/FindCommand.java b/src/main/java/Dukes/command/FindCommand.java index 73da20bf..bcbadf3e 100644 --- a/src/main/java/Dukes/command/FindCommand.java +++ b/src/main/java/Dukes/command/FindCommand.java @@ -14,36 +14,39 @@ public class FindCommand extends Command { public FindCommand(String keyWord) { this.keyWord = keyWord; } + /** * Finds the tasks with the given keyword. - * @param tasks TaskList to be appended. - * @param ui UI to interact with user. + * + * @param tasks TaskList to be appended. + * @param ui UI to interact with user. * @param storage Storage to read and write files. */ @Override public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException { TaskList filteredTasks = new TaskList(); - int count =0; + int count = 0; try { - for (Task task :tasks.list) { + for (Task task : tasks.list) { String description = task.getDescription().toLowerCase(); if (description.contains(keyWord)) { filteredTasks.list.add(task); + count += 1; } } - if (tasks.isEmpty() || count ==0) { - throw new DukeException("There is no task in the list"); - } else { - System.out.println("Here are the matching tasks in your list:"); - for (int i = 0; i < filteredTasks.list.size(); i++) { - System.out.println((i + 1) + "." + filteredTasks.list.get(i)); + if (count == 0) { + throw new DukeException("There is no task in the list"); + } else { + System.out.println("Here are the matching tasks in your list:"); + for (int i = 0; i < filteredTasks.list.size(); i++) { + System.out.println((i + 1) + "." + filteredTasks.list.get(i)); + } } - } - } catch (IndexOutOfBoundsException e) { + }catch (IndexOutOfBoundsException e) { System.out.print("current task is empty in your list."); } + } } -} From 25507db3d0542f4ba8218ead2ad282e8b8953dfc Mon Sep 17 00:00:00 2001 From: linqing42 Date: Sun, 20 Sep 2020 21:54:18 +0800 Subject: [PATCH 49/94] latest update --- src/main/java/Dukes/command/FindCommand.java | 2 +- text-ui-test/runtest.bat | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/Dukes/command/FindCommand.java b/src/main/java/Dukes/command/FindCommand.java index bcbadf3e..e357ee9c 100644 --- a/src/main/java/Dukes/command/FindCommand.java +++ b/src/main/java/Dukes/command/FindCommand.java @@ -44,7 +44,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException } } }catch (IndexOutOfBoundsException e) { - System.out.print("current task is empty in your list."); + System.out.print("Current task is empty in your list."); } } } diff --git a/text-ui-test/runtest.bat b/text-ui-test/runtest.bat index 01cef5bf..346bd533 100644 --- a/text-ui-test/runtest.bat +++ b/text-ui-test/runtest.bat @@ -7,11 +7,13 @@ REM delete output from previous run del ACTUAL.TXT REM compile the code into the bin folder -javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\Duke.java +javac -cp ..\src\main\java\Dukes -Xlint:none -d ..\bin ..\src\main\java\Dukes\Duke.java + IF ERRORLEVEL 1 ( echo ********** BUILD FAILURE ********** exit /b 1 ) + REM no error here, errorlevel == 0 REM run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT From 0afe19a858dd744840598a9ec709b098fc094fab Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 02:11:13 +0800 Subject: [PATCH 50/94] add readme.md --- data/duke.txt | 7 +- docs/README.md | 235 +++++++++++++++++- src/main/java/Dukes/Duke.java | 4 +- src/main/java/Dukes/Tasks/Task.java | 2 +- src/main/java/Dukes/command/AddCommand.java | 2 +- src/main/java/Dukes/command/Command.java | 2 +- .../java/Dukes/command/DeleteCommand.java | 2 +- src/main/java/Dukes/command/DoneCommand.java | 2 +- src/main/java/Dukes/command/ExitCommand.java | 2 +- src/main/java/Dukes/command/FindCommand.java | 4 +- src/main/java/Dukes/command/ListCommand.java | 11 +- src/main/java/Dukes/{ => parser}/Parser.java | 5 +- .../java/Dukes/{ => storage}/Storage.java | 2 +- src/test/Dukes/ParserTest.java | 1 + src/test/Dukes/ToDoTest.java | 2 +- 15 files changed, 256 insertions(+), 27 deletions(-) rename src/main/java/Dukes/{ => parser}/Parser.java (98%) rename src/main/java/Dukes/{ => storage}/Storage.java (99%) diff --git a/data/duke.txt b/data/duke.txt index 0f441f45..e4b1b4bf 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,4 +1,3 @@ -T | 0 | read book -D | 0 | borrow book | 12 Dec 2019, 06:00 PM -E | 1 | return book | 12 Jan 2020, 05:00 PM -T | 0 | join club +T | 1 | read book +D | 0 | return book | 12 Nov 2019, 06:00 PM +E | 0 | join club | 11 Feb 2020, 01:00 PM diff --git a/docs/README.md b/docs/README.md index fd440695..bdc0f50a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,20 +1,245 @@ # User Guide +Dukes Project is a program that helps forgetful user to remember things and finish the task before the deadline. + +## Quick start ## Features ### Feature 1 -Description of feature. +Adding a task: todo + +## Usage +Adding a task in the task list and show the total number of task in the list. + +### `todo` - Adding a task into a task list. + +The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a todo cannot be empty. + +Format: todo Description + +Example of usage: +TOdo Read BOOK + +Expected outcome: + +Got it. I've added this task: +[T][X] Read BOOK +Now you have [index number] task in the list. + +### Feature 2 +Adding a deadline task: deadline + +## Usage +Adding a deadline task helps to know the deadline for the specific task in the task list and show the total number of task in the list. + +### `deadline` - Adding a deadline task + +The keyword 'deadline' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a deadline cannot be empty. + +-If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" +Format: deadline Description /by dd/mm/yyyy HHmm + +Example of usage: +deadline return book /by 12/12/2019 1800 + +Expected outcome: + +Got it. I've added this task: +[D][X] return book (by:12 Dec 2019, 06:00 PM) +Now you have [index number] task in the list. + +### Feature 3 +Adding an event task: event + +## Usage +Adding an event task helps to remember to join or complete the event with specific date and time in the task list and show the total number of task in the list. + +### `event` - Adding an event task + +The keyword 'event' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a event cannot be empty. +-If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" +Format: event Description /by dd/mm/yyyy HHmm + +Example of usage: +EVENT join club /at 12/11/2019 0900 + +Expected outcome: + +Got it. I've added this task: +[E][X] join club (at:12 Nov 2019, 09:00 AM) +Now you have [index number] task in the list. + +### Feature 4 +Marking a specific task: done ## Usage +Marking a specific task to remind the user that he has finished the task. + +### `done` - Marking a specific task from the task list. -### `Keyword` - Describe action +The keyword 'done' can be **upper and lowercase letters** and its outcome will be change the X to ✓ in the specific task. +The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... +If you key in the keyword without INDEX. There will be an error message:please key in correct format. -Describe action and its outcome. +Format: done INDEX Example of usage: +step 1: TODO READ BOOK +step 2: Done 1 or DONE 1 or done 1 + +Expected outcome: + +Nice! I've marked this task as done: +[T][✓] READ BOOK + +### Feature 5 +Deleting a task: delete + +## Usage +Delete a specific task from task list to helps remove the completed task and tidy the task list. It will show the total number of tasks left in the task list. + +### `delete` - Deleting a specific task from the task list. + +The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. +The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... +If you key in the keyword without INDEX. There will be an error message:☹ OOPS!!! There is no specific task to delete. + +Format: delete INDEX + +Example of usage: + +step 1.TODO READ BOOK + +step 2: done 1 + +steps 3:Delete 1 or DELETE 1 or delete 1 + +Expected outcome: -`keyword (optional arguments)` +Noted. I've removed this task: +[T][✓] READ BOOK +Now you have [INDEX-1] task in the list. + +### Feature 6 +Listing all tasks: list + +## Usage +It shows a list of all task in the task list with a number. it helps to summarize the task list. +### `list` - Listing all tasks with number. + +The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list +If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." + +Format: list + +Example of usage: +step 1.TODO READ BOOK +step 2. list or List or LIST + +Expected outcome: + Here are the tasks in your list: + 1.[T][X] READ BOOK + +### Feature 7 +Locating tasks by description_keyword: find + +## Usage +It helps to search a task that contain any of the given description_keyword, and the search is case-insensitive. e.g book will match BOOK. Therefore, the user can easily find out the specific task base on find function. +### `find` - Locating tasks with given description_keyword + +The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. +Meanwhile, the order of the description_keyword does not matter. +If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." + +If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." + +Format: find description_keyword[more_keyword] + +Example of usage: +step 1.TODO READ BOOK + +step 2. todo join club + +step 3. find book or Find BOok or FIND BOOK + +Expected outcome: + +Here are the matching tasks in your list: +1.[T][X] READ BOOK + +### Feature 8 +Exiting the program: exit/bye + +## Usage +It helps to end the program and display the list of a task will be save in the hard disk. +### `exit/bye` - Exiting the program + +The keyword 'exit/by' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. + +Format: exit + +Format: bye + +Example of usage: +step 1.TODO READ BOOK + +step 2. todo join club + +step 3. bye/exit/BYE/EXIT/Bye/Exit + +Expected outcome: + +Your following tasks will be save: +[T][X] READ BOOK +[T][X] join club +Bye. Hope to see you again soon! + +### Feature 9 +Saving the task in the hard-disk +## Usage +It helps to save the tasks in the hard disk automatically after exiting the program, and the format of display will be change when task save in hard disk. It saves the user's time as there is no need to save manually. + +Example of usage: +step 1.todo read book + +step 2. deadline return book /by 12/11/2019 1800 + +step 3. event join club /at 11/2/2020 1300 + +step 4. done 1 + +step 5. bye + +Expected outcome: save into /data/duke.txt + +T | 1 | read book +D | 0 | return book | 12 Nov 2019, 06:00 PM +E | 0 | join club | 11 Feb 2020, 01:00 PM + +### Feature 10 + +Exceptions message +## Usage +It helps to handle error message that will guid the user. + +Example of usage: +read book Expected outcome: +☹ OOPS!!! I'm sorry, but I don't know what that means :-( -`outcome` +## Command Summary +Action | Format, Examples +------------ | ------------- +Todo | todo Description e.g. todo read book +Deadline | deadline Description /by dd/mm/yyyy HHmm e.g. deadline return book /by 12/12/2019 1800 +Event | event Description /at dd/mm/yyyy HHmm e.g. event join club /by 11/1/2019 1300 +Done | done INDEX e.g. done 1 +Delete | delete INDEX e.g. delete 1 +List | list +Find | find description_keyword[more_keywords] e.g. find book +Exit | exit +Bye | bye \ No newline at end of file diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index a29f57dc..3a88e694 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -2,6 +2,8 @@ import Dukes.Exceptions.DukeException; import Dukes.Tasks.TaskList; import Dukes.command.Command; +import Dukes.parser.Parser; +import Dukes.storage.Storage; /** @@ -14,7 +16,7 @@ * @since 14/9/2020 */ public class Duke { - private Storage storage; + private Storage storage; private TaskList tasks; private Ui ui; /** diff --git a/src/main/java/Dukes/Tasks/Task.java b/src/main/java/Dukes/Tasks/Task.java index eb6aaa07..327dcf38 100644 --- a/src/main/java/Dukes/Tasks/Task.java +++ b/src/main/java/Dukes/Tasks/Task.java @@ -21,7 +21,7 @@ public Task(String description) { * @return Icon to indicate status of the task. */ public String getStatusIcon() { - return (isDone ? "\u2713" : "\u2718"); + return (isDone ? "✓" : "X"); } public String getFileStatusIcon() { return (isDone ? "1" : "0"); diff --git a/src/main/java/Dukes/command/AddCommand.java b/src/main/java/Dukes/command/AddCommand.java index bffe02e8..bb6e131b 100644 --- a/src/main/java/Dukes/command/AddCommand.java +++ b/src/main/java/Dukes/command/AddCommand.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.Task; import Dukes.Tasks.TaskList; import Dukes.Ui; diff --git a/src/main/java/Dukes/command/Command.java b/src/main/java/Dukes/command/Command.java index 99981744..399b792d 100644 --- a/src/main/java/Dukes/command/Command.java +++ b/src/main/java/Dukes/command/Command.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.Task; import Dukes.Tasks.TaskList; import Dukes.Ui; diff --git a/src/main/java/Dukes/command/DeleteCommand.java b/src/main/java/Dukes/command/DeleteCommand.java index bcc3a10c..05abcc0a 100644 --- a/src/main/java/Dukes/command/DeleteCommand.java +++ b/src/main/java/Dukes/command/DeleteCommand.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.TaskList; import Dukes.Tasks.Task; import Dukes.Ui; diff --git a/src/main/java/Dukes/command/DoneCommand.java b/src/main/java/Dukes/command/DoneCommand.java index f59cb03a..cd8faffa 100644 --- a/src/main/java/Dukes/command/DoneCommand.java +++ b/src/main/java/Dukes/command/DoneCommand.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.TaskList; import Dukes.Tasks.Task; import Dukes.Ui; diff --git a/src/main/java/Dukes/command/ExitCommand.java b/src/main/java/Dukes/command/ExitCommand.java index 77aea947..3b6c107a 100644 --- a/src/main/java/Dukes/command/ExitCommand.java +++ b/src/main/java/Dukes/command/ExitCommand.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.TaskList; import Dukes.Ui; /** diff --git a/src/main/java/Dukes/command/FindCommand.java b/src/main/java/Dukes/command/FindCommand.java index e357ee9c..9786a077 100644 --- a/src/main/java/Dukes/command/FindCommand.java +++ b/src/main/java/Dukes/command/FindCommand.java @@ -1,7 +1,7 @@ package Dukes.command; import Dukes.Exceptions.DukeException; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.Task; import Dukes.Tasks.TaskList; import Dukes.Ui; @@ -36,7 +36,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException } } if (count == 0) { - throw new DukeException("There is no task in the list"); + throw new DukeException("☹ OOPS!!! There is no matching task in the list"); } else { System.out.println("Here are the matching tasks in your list:"); for (int i = 0; i < filteredTasks.list.size(); i++) { diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java index 0311a13c..5199d0e2 100644 --- a/src/main/java/Dukes/command/ListCommand.java +++ b/src/main/java/Dukes/command/ListCommand.java @@ -1,6 +1,6 @@ package Dukes.command; -import Dukes.Storage; +import Dukes.storage.Storage; import Dukes.Tasks.TaskList; import Dukes.Ui; /** @@ -23,14 +23,15 @@ public ListCommand() { @Override public void execute(TaskList tasks, Ui ui, Storage storage) { try { - if(!tasks.isEmpty()) { + int count =tasks.list.size(); + if(count ==0) { + System.out.println("☹ OOPS!!! There are no tasks in your list."); + }else{ System.out.println(" Here are the tasks in your list:"); for (int i = 0; i < tasks.list.size(); i++) { System.out.println(" " + (i + 1) + "." + tasks.list.get(i)); } - } else{ - System.out.println("There are no tasks in your list"); - } + } } catch (IndexOutOfBoundsException e) { System.out.print("current task is empty in your list."); } diff --git a/src/main/java/Dukes/Parser.java b/src/main/java/Dukes/parser/Parser.java similarity index 98% rename from src/main/java/Dukes/Parser.java rename to src/main/java/Dukes/parser/Parser.java index ba978c6c..d2f6a5c3 100644 --- a/src/main/java/Dukes/Parser.java +++ b/src/main/java/Dukes/parser/Parser.java @@ -1,10 +1,11 @@ -package Dukes; +package Dukes.parser; import Dukes.Exceptions.DukeException; import Dukes.Tasks.Deadline; import Dukes.Tasks.Event; import Dukes.Tasks.Task; import Dukes.Tasks.ToDo; +import Dukes.Ui; import Dukes.command.*; import java.text.SimpleDateFormat; @@ -85,7 +86,7 @@ public static Command parse(String input) throws DukeException { } String[] splitEvent = input.split("/at"); if (splitEvent.length < 2) { - throw new DukeException("Please specify the event time\n"); + throw new DukeException("Please specify the event date and time\n"); } String event = splitEvent[0].substring(6); String time = splitEvent[1]; diff --git a/src/main/java/Dukes/Storage.java b/src/main/java/Dukes/storage/Storage.java similarity index 99% rename from src/main/java/Dukes/Storage.java rename to src/main/java/Dukes/storage/Storage.java index 321d87f8..ca882aaf 100644 --- a/src/main/java/Dukes/Storage.java +++ b/src/main/java/Dukes/storage/Storage.java @@ -1,4 +1,4 @@ -package Dukes; +package Dukes.storage; import Dukes.Tasks.Deadline; import Dukes.Tasks.Event; diff --git a/src/test/Dukes/ParserTest.java b/src/test/Dukes/ParserTest.java index d11e4eb2..af2a5138 100644 --- a/src/test/Dukes/ParserTest.java +++ b/src/test/Dukes/ParserTest.java @@ -2,6 +2,7 @@ import Dukes.command.*; +import Dukes.parser.Parser; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/Dukes/ToDoTest.java b/src/test/Dukes/ToDoTest.java index 24448a28..1e4073df 100644 --- a/src/test/Dukes/ToDoTest.java +++ b/src/test/Dukes/ToDoTest.java @@ -9,7 +9,7 @@ public class ToDoTest { @Test public void ToDoTest() { ToDo todo = new ToDo("return book"); - assertEquals("[T][✘] return book", todo.toString()); + assertEquals("[T][X] return book", todo.toString()); assertEquals("T | 0 | return book", todo.toWriteFile()); } From cb18b937b615d32352d0ea87758bcc51a0f5f9d5 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 02:35:19 +0800 Subject: [PATCH 51/94] add readme.md --- docs/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/README.md b/docs/README.md index bdc0f50a..e5036c40 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,6 +3,18 @@ Dukes Project is a program that helps forgetful user to remember things and fini ## Quick start +1. Ensure you have Java 11 or above installed in your Computer +1. Download the IntelliJ +1. Set up the correct JDK version as follows: + 1. Click `Configure` > `Structure for New Projects` and then `Project Settings` > `Project` > `Project SDK` + 1. If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11 + 1. Click `OK` +1.Download the latest project from Github:[links](https://github.com/linqing42/ip) +1.Import the project into Intellij. +1. Go to the sr folder and find src\main\java\Dukes\Duke +1. Right click the Duke and select Run Duke +1. The program now should run on the Console (usually located at the bottom side) + ## Features ### Feature 1 From 65cc0fcbd348dc174ddf61f6927d433b8894e89b Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 02:46:32 +0800 Subject: [PATCH 52/94] Update README.md --- docs/README.md | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/docs/README.md b/docs/README.md index e5036c40..e55d8c0c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -21,19 +21,18 @@ Dukes Project is a program that helps forgetful user to remember things and fini Adding a task: todo ## Usage -Adding a task in the task list and show the total number of task in the list. +Adding a task in the task list and show the total number of task in the list. Therefore, the user know the task that he need to do. ### `todo` - Adding a task into a task list. -The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. -If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a todo cannot be empty. +black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " -Format: todo Description +**Format**: todo Description -Example of usage: -TOdo Read BOOK +**Example of usage**: TOdo Read BOOK -Expected outcome: +**Expected outcome**: Got it. I've added this task: [T][X] Read BOOK @@ -47,20 +46,19 @@ Adding a deadline task helps to know the deadline for the specific task in the t ### `deadline` - Adding a deadline task -The keyword 'deadline' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a deadline cannot be empty. +black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +black_medium_small_square:If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a deadline cannot be empty. +black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" --If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" -Format: deadline Description /by dd/mm/yyyy HHmm +**Format**: deadline Description /by dd/mm/yyyy HHmm -Example of usage: -deadline return book /by 12/12/2019 1800 +**Example of usage**: +1.deadline return book /by 12/12/2019 1800 -Expected outcome: - -Got it. I've added this task: -[D][X] return book (by:12 Dec 2019, 06:00 PM) -Now you have [index number] task in the list. +**Expected outcome**: +1.Got it. I've added this task: +1.[D][X] return book (by:12 Dec 2019, 06:00 PM) +1.Now you have [index number] task in the list. ### Feature 3 Adding an event task: event @@ -70,9 +68,10 @@ Adding an event task helps to remember to join or complete the event with specif ### `event` - Adding an event task -The keyword 'event' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a event cannot be empty. --If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" +1.The keyword 'event' with description can be **upper and lowercase letters**. +1.The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +1.If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a event cannot be empty. +1.If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" Format: event Description /by dd/mm/yyyy HHmm Example of usage: @@ -254,4 +253,4 @@ Delete | delete INDEX e.g. delete 1 List | list Find | find description_keyword[more_keywords] e.g. find book Exit | exit -Bye | bye \ No newline at end of file +Bye | bye From 5f32a0294699b768616b815031ebafa2a5257197 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:04:07 +0800 Subject: [PATCH 53/94] Update README.md --- docs/README.md | 216 ++++++++++++++++++++++--------------------------- 1 file changed, 95 insertions(+), 121 deletions(-) diff --git a/docs/README.md b/docs/README.md index e55d8c0c..0cb1c7e6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,8 +9,8 @@ Dukes Project is a program that helps forgetful user to remember things and fini 1. Click `Configure` > `Structure for New Projects` and then `Project Settings` > `Project` > `Project SDK` 1. If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11 1. Click `OK` -1.Download the latest project from Github:[links](https://github.com/linqing42/ip) -1.Import the project into Intellij. +1. Download the latest project from Github: [links](https://github.com/linqing42/ip). +1. Import the project into Intellij. 1. Go to the sr folder and find src\main\java\Dukes\Duke 1. Right click the Duke and select Run Duke 1. The program now should run on the Console (usually located at the bottom side) @@ -24,19 +24,17 @@ Adding a task: todo Adding a task in the task list and show the total number of task in the list. Therefore, the user know the task that he need to do. ### `todo` - Adding a task into a task list. - -black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. -black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " +
:black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " **Format**: todo Description **Example of usage**: TOdo Read BOOK **Expected outcome**: - -Got it. I've added this task: -[T][X] Read BOOK -Now you have [index number] task in the list. +
Got it. I've added this task: +
[T][X] Read BOOK +
Now you have [index number] task in the list. ### Feature 2 Adding a deadline task: deadline @@ -46,19 +44,19 @@ Adding a deadline task helps to know the deadline for the specific task in the t ### `deadline` - Adding a deadline task -black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**.the outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -black_medium_small_square:If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a deadline cannot be empty. -black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" +:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. +:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" **Format**: deadline Description /by dd/mm/yyyy HHmm -**Example of usage**: -1.deadline return book /by 12/12/2019 1800 +**Example of usage**: deadline return book /by 12/12/2019 1800 **Expected outcome**: -1.Got it. I've added this task: -1.[D][X] return book (by:12 Dec 2019, 06:00 PM) -1.Now you have [index number] task in the list. +
Got it. I've added this task: +
[D][X] return book (by:12 Dec 2019, 06:00 PM) +
Now you have [index number] task in the list. ### Feature 3 Adding an event task: event @@ -68,20 +66,19 @@ Adding an event task helps to remember to join or complete the event with specif ### `event` - Adding an event task -1.The keyword 'event' with description can be **upper and lowercase letters**. -1.The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -1.If you key in the keyword without description. There will be an error message:☹ OOPS!!! The description of a event cannot be empty. -1.If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" -Format: event Description /by dd/mm/yyyy HHmm +:black_medium_small_square:The keyword 'event' with description can be **upper and lowercase letters**. +:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." +:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" -Example of usage: -EVENT join club /at 12/11/2019 0900 +**Format**: event Description /by dd/mm/yyyy HHmm -Expected outcome: +**Example of usage**: EVENT join club /at 12/11/2019 0900 -Got it. I've added this task: -[E][X] join club (at:12 Nov 2019, 09:00 AM) -Now you have [index number] task in the list. +**Expected outcome**: +
Got it. I've added this task: +
[E][X] join club (at:12 Nov 2019, 09:00 AM) +
Now you have [index number] task in the list. ### Feature 4 Marking a specific task: done @@ -90,21 +87,20 @@ Marking a specific task: done Marking a specific task to remind the user that he has finished the task. ### `done` - Marking a specific task from the task list. +:black_medium_small_square:The keyword 'done' can be **upper and lowercase letters** +:black_medium_small_square:The outcome will be change the X to ✓ in the specific task. +:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... +:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." -The keyword 'done' can be **upper and lowercase letters** and its outcome will be change the X to ✓ in the specific task. -The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... -If you key in the keyword without INDEX. There will be an error message:please key in correct format. - -Format: done INDEX - -Example of usage: -step 1: TODO READ BOOK -step 2: Done 1 or DONE 1 or done 1 +**Format**: done INDEX -Expected outcome: +**Example of usage**: +
step 1: TODO READ BOOK +
step 2: Done 1 or DONE 1 or done 1 -Nice! I've marked this task as done: -[T][✓] READ BOOK +**Expected outcome**: +
Nice! I've marked this task as done: +
[T][✓] READ BOOK ### Feature 5 Deleting a task: delete @@ -113,26 +109,21 @@ Deleting a task: delete Delete a specific task from task list to helps remove the completed task and tidy the task list. It will show the total number of tasks left in the task list. ### `delete` - Deleting a specific task from the task list. +:black_medium_small_square:The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. +:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... +:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"☹ OOPS!!! There is no specific task to delete." -The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. -The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... -If you key in the keyword without INDEX. There will be an error message:☹ OOPS!!! There is no specific task to delete. - -Format: delete INDEX - -Example of usage: - -step 1.TODO READ BOOK +**Format**: delete INDEX -step 2: done 1 - -steps 3:Delete 1 or DELETE 1 or delete 1 - -Expected outcome: +**Example of usage**: +
step 1.TODO READ BOOK +
step 2: done 1 +
steps 3:Delete 1 or DELETE 1 or delete 1 -Noted. I've removed this task: -[T][✓] READ BOOK -Now you have [INDEX-1] task in the list. +**Expected outcome**: +
Noted. I've removed this task: +
[T][✓] READ BOOK +
Now you have [INDEX-1] task in the list. ### Feature 6 Listing all tasks: list @@ -140,19 +131,18 @@ Listing all tasks: list ## Usage It shows a list of all task in the task list with a number. it helps to summarize the task list. ### `list` - Listing all tasks with number. +:black_medium_small_square:The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list +:black_medium_small_square:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." -The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list -If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." - -Format: list +**Format**: list -Example of usage: -step 1.TODO READ BOOK -step 2. list or List or LIST +**Example of usage**: +
step 1.TODO READ BOOK +
step 2. list or List or LIST -Expected outcome: - Here are the tasks in your list: - 1.[T][X] READ BOOK +**Expected outcome**: +
Here are the tasks in your list: +
1.[T][X] READ BOOK ### Feature 7 Locating tasks by description_keyword: find @@ -160,26 +150,21 @@ Locating tasks by description_keyword: find ## Usage It helps to search a task that contain any of the given description_keyword, and the search is case-insensitive. e.g book will match BOOK. Therefore, the user can easily find out the specific task base on find function. ### `find` - Locating tasks with given description_keyword +:black_medium_small_square:The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. +:black_medium_small_square:The order of the description_keyword does not matter. +:black_medium_small_square:If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." +:black_medium_small_square:If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." -The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. -Meanwhile, the order of the description_keyword does not matter. -If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." - -If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." - -Format: find description_keyword[more_keyword] - -Example of usage: -step 1.TODO READ BOOK +**Format**: find description_keyword[more_keyword] -step 2. todo join club - -step 3. find book or Find BOok or FIND BOOK - -Expected outcome: +**Example of usage**: +
step 1.TODO READ BOOK +
step 2. todo join club +
step 3. find book or Find BOok or FIND BOOK -Here are the matching tasks in your list: -1.[T][X] READ BOOK +**Expected outcome**: +
Here are the matching tasks in your list: +
1.[T][X] READ BOOK ### Feature 8 Exiting the program: exit/bye @@ -187,60 +172,49 @@ Exiting the program: exit/bye ## Usage It helps to end the program and display the list of a task will be save in the hard disk. ### `exit/bye` - Exiting the program +
The keyword 'exit/by' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. -The keyword 'exit/by' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. - -Format: exit +**Format**: exit +**Format**: bye -Format: bye - -Example of usage: -step 1.TODO READ BOOK - -step 2. todo join club - -step 3. bye/exit/BYE/EXIT/Bye/Exit - -Expected outcome: +**Example of usage**: +
step 1.TODO READ BOOK +
step 2. todo join club +
step 3. bye/exit/BYE/EXIT/Bye/Exit -Your following tasks will be save: -[T][X] READ BOOK -[T][X] join club -Bye. Hope to see you again soon! +**Expected outcome**: +
Your following tasks will be save: +
[T][X] READ BOOK +
[T][X] join club +
Bye. Hope to see you again soon! ### Feature 9 Saving the task in the hard-disk ## Usage It helps to save the tasks in the hard disk automatically after exiting the program, and the format of display will be change when task save in hard disk. It saves the user's time as there is no need to save manually. -Example of usage: -step 1.todo read book - -step 2. deadline return book /by 12/11/2019 1800 - -step 3. event join club /at 11/2/2020 1300 - -step 4. done 1 - -step 5. bye - -Expected outcome: save into /data/duke.txt +**Example of usage**: +
step 1.todo read book +
step 2. deadline return book /by 12/11/2019 1800 +
step 3. event join club /at 11/2/2020 1300 +
step 4. done 1 +
step 5. bye -T | 1 | read book -D | 0 | return book | 12 Nov 2019, 06:00 PM -E | 0 | join club | 11 Feb 2020, 01:00 PM +**Expected outcome**: save into /data/duke.txt +
T | 1 | read book +
D | 0 | return book | 12 Nov 2019, 06:00 PM +
E | 0 | join club | 11 Feb 2020, 01:00 PM ### Feature 10 - Exceptions message ## Usage It helps to handle error message that will guid the user. -Example of usage: -read book +**Example of usage**: +
read book -Expected outcome: -☹ OOPS!!! I'm sorry, but I don't know what that means :-( +**Expected outcome**: +
☹ OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary Action | Format, Examples From 6e03d3ae786ce48c88f825da83ca603e1dd9fc2f Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:07:11 +0800 Subject: [PATCH 54/94] Update README.md --- docs/README.md | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/README.md b/docs/README.md index 0cb1c7e6..637744df 100644 --- a/docs/README.md +++ b/docs/README.md @@ -44,10 +44,10 @@ Adding a deadline task helps to know the deadline for the specific task in the t ### `deadline` - Adding a deadline task -:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. -:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." -:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" +
:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. +
:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" **Format**: deadline Description /by dd/mm/yyyy HHmm @@ -66,10 +66,10 @@ Adding an event task helps to remember to join or complete the event with specif ### `event` - Adding an event task -:black_medium_small_square:The keyword 'event' with description can be **upper and lowercase letters**. -:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." -:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" +
:black_medium_small_square:The keyword 'event' with description can be **upper and lowercase letters**. +
:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." +
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" **Format**: event Description /by dd/mm/yyyy HHmm @@ -87,10 +87,10 @@ Marking a specific task: done Marking a specific task to remind the user that he has finished the task. ### `done` - Marking a specific task from the task list. -:black_medium_small_square:The keyword 'done' can be **upper and lowercase letters** -:black_medium_small_square:The outcome will be change the X to ✓ in the specific task. -:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... -:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." +
:black_medium_small_square:The keyword 'done' can be **upper and lowercase letters** +
:black_medium_small_square:The outcome will be change the X to ✓ in the specific task. +
:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... +
:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." **Format**: done INDEX @@ -109,9 +109,9 @@ Deleting a task: delete Delete a specific task from task list to helps remove the completed task and tidy the task list. It will show the total number of tasks left in the task list. ### `delete` - Deleting a specific task from the task list. -:black_medium_small_square:The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. -:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... -:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"☹ OOPS!!! There is no specific task to delete." +
:black_medium_small_square:The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. +
:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... +
:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"☹ OOPS!!! There is no specific task to delete." **Format**: delete INDEX @@ -131,8 +131,8 @@ Listing all tasks: list ## Usage It shows a list of all task in the task list with a number. it helps to summarize the task list. ### `list` - Listing all tasks with number. -:black_medium_small_square:The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list -:black_medium_small_square:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." +
:black_medium_small_square:The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list +
:black_medium_small_square:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." **Format**: list @@ -150,10 +150,10 @@ Locating tasks by description_keyword: find ## Usage It helps to search a task that contain any of the given description_keyword, and the search is case-insensitive. e.g book will match BOOK. Therefore, the user can easily find out the specific task base on find function. ### `find` - Locating tasks with given description_keyword -:black_medium_small_square:The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. -:black_medium_small_square:The order of the description_keyword does not matter. -:black_medium_small_square:If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." -:black_medium_small_square:If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." +
:black_medium_small_square:The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. +
:black_medium_small_square:The order of the description_keyword does not matter. +
:black_medium_small_square:If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." +
:black_medium_small_square:If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." **Format**: find description_keyword[more_keyword] From 11cd8224a36a98e563515ea2073143fceafc5a82 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:08:23 +0800 Subject: [PATCH 55/94] Update README.md --- docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 637744df..83b0b7b1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -45,9 +45,9 @@ Adding a deadline task helps to know the deadline for the specific task in the t ### `deadline` - Adding a deadline task
:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. -
:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +
:black_medium_small_square:The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." -
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time" +
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." **Format**: deadline Description /by dd/mm/yyyy HHmm @@ -69,7 +69,7 @@ Adding an event task helps to remember to join or complete the event with specif
:black_medium_small_square:The keyword 'event' with description can be **upper and lowercase letters**.
:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." -
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time" +
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time." **Format**: event Description /by dd/mm/yyyy HHmm From fb816b196d2da135a2fe2b00f588d9bea3aa70ce Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:16:08 +0800 Subject: [PATCH 56/94] Set theme jekyll-theme-time-machine --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..ddeb671b --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-time-machine \ No newline at end of file From 97adb5170c8bcbc87be6cf06330db2d6321e9c31 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:34:45 +0800 Subject: [PATCH 57/94] Update README.md --- docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 83b0b7b1..210942e8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -23,9 +23,9 @@ Adding a task: todo ## Usage Adding a task in the task list and show the total number of task in the list. Therefore, the user know the task that he need to do. -### `todo` - Adding a task into a task list. -
:black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. -
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " +#### `todo` - Adding a task into a task list. +
The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +
If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " **Format**: todo Description From 4d9fc8e970419092282e152dac7f0dc6ce4842f8 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:38:29 +0800 Subject: [PATCH 58/94] Update README.md --- docs/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/README.md b/docs/README.md index 210942e8..5c05bf2f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -42,12 +42,12 @@ Adding a deadline task: deadline ## Usage Adding a deadline task helps to know the deadline for the specific task in the task list and show the total number of task in the list. -### `deadline` - Adding a deadline task +#### `deadline` - Adding a deadline task -
:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. -
:black_medium_small_square:The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a -
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." -
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." +
The keyword 'deadline' with description can be **upper and lowercase letters**. +
The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a +
If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +
If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." **Format**: deadline Description /by dd/mm/yyyy HHmm From 54c77c24965fabc068997dfd11b053eaf1bff0fa Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:39:49 +0800 Subject: [PATCH 59/94] Delete _config.yml --- docs/_config.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index ddeb671b..00000000 --- a/docs/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-time-machine \ No newline at end of file From 9fddacbbdca8a5ab3eabdb6a1dec1ea9475311c5 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:40:30 +0800 Subject: [PATCH 60/94] Update README.md --- docs/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index 5c05bf2f..93a904ea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,8 +24,8 @@ Adding a task: todo Adding a task in the task list and show the total number of task in the list. Therefore, the user know the task that he need to do. #### `todo` - Adding a task into a task list. -
The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. -
If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " +
:black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " **Format**: todo Description @@ -44,10 +44,10 @@ Adding a deadline task helps to know the deadline for the specific task in the t #### `deadline` - Adding a deadline task -
The keyword 'deadline' with description can be **upper and lowercase letters**. -
The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a -
If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." -
If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." +
:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. +
:black_medium_small_square:The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a +
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." **Format**: deadline Description /by dd/mm/yyyy HHmm From 53bc3e2893d9498fc3fd2e7b66918396e3554ecc Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:44:59 +0800 Subject: [PATCH 61/94] Set theme jekyll-theme-time-machine --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..ddeb671b --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-time-machine \ No newline at end of file From 2ad403bbdf35bc8d4b2d1b567ab718d52a068f3a Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:48:20 +0800 Subject: [PATCH 62/94] Update README.md --- docs/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/README.md b/docs/README.md index 93a904ea..3d634412 100644 --- a/docs/README.md +++ b/docs/README.md @@ -23,9 +23,9 @@ Adding a task: todo ## Usage Adding a task in the task list and show the total number of task in the list. Therefore, the user know the task that he need to do. -#### `todo` - Adding a task into a task list. -
:black_medium_small_square:The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. -
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " +### `todo` - Adding a task into a task list. +
>The keyword 'todo' with description can be **upper and lowercase letters** and its outcome will not include the keyword. +
>If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a todo cannot be empty. " **Format**: todo Description @@ -42,12 +42,12 @@ Adding a deadline task: deadline ## Usage Adding a deadline task helps to know the deadline for the specific task in the task list and show the total number of task in the list. -#### `deadline` - Adding a deadline task +### `deadline` - Adding a deadline task -
:black_medium_small_square:The keyword 'deadline' with description can be **upper and lowercase letters**. -
:black_medium_small_square:The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a -
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." -
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." +
>The keyword 'deadline' with description can be **upper and lowercase letters**. +
>The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a +
>If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +
>If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." **Format**: deadline Description /by dd/mm/yyyy HHmm From 6d2e23be64f8585832cea52a66143b4c1fe61627 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:52:52 +0800 Subject: [PATCH 63/94] Update README.md --- docs/README.md | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/README.md b/docs/README.md index 3d634412..1d9838d2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -66,10 +66,10 @@ Adding an event task helps to remember to join or complete the event with specif ### `event` - Adding an event task -
:black_medium_small_square:The keyword 'event' with description can be **upper and lowercase letters**. -
:black_medium_small_square:The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -
:black_medium_small_square:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." -
:black_medium_small_square:If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time." +
>:The keyword 'event' with description can be **upper and lowercase letters**. +
>The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a +
>:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." +
>If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time." **Format**: event Description /by dd/mm/yyyy HHmm @@ -87,10 +87,10 @@ Marking a specific task: done Marking a specific task to remind the user that he has finished the task. ### `done` - Marking a specific task from the task list. -
:black_medium_small_square:The keyword 'done' can be **upper and lowercase letters** -
:black_medium_small_square:The outcome will be change the X to ✓ in the specific task. -
:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... -
:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." +
>The keyword 'done' can be **upper and lowercase letters** +
>The outcome will be change the X to ✓ in the specific task. +
>The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... +
>:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." **Format**: done INDEX @@ -109,9 +109,9 @@ Deleting a task: delete Delete a specific task from task list to helps remove the completed task and tidy the task list. It will show the total number of tasks left in the task list. ### `delete` - Deleting a specific task from the task list. -
:black_medium_small_square:The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. -
:black_medium_small_square:The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... -
:black_medium_small_square:If you key in the keyword without INDEX. There will be an error message:"☹ OOPS!!! There is no specific task to delete." +
>The keyword 'delete' can be **upper and lowercase letters** and its outcome will be remove the specific task and reduce the total number of task in the list. +
>The index refers to the index number shown in the displayed task list and the index **must be a positive integer** 1,2,3... +
>If you key in the keyword without INDEX. There will be an error message:"☹ OOPS!!! There is no specific task to delete." **Format**: delete INDEX @@ -131,8 +131,8 @@ Listing all tasks: list ## Usage It shows a list of all task in the task list with a number. it helps to summarize the task list. ### `list` - Listing all tasks with number. -
:black_medium_small_square:The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list -
:black_medium_small_square:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." +
>The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list +
>:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." **Format**: list @@ -150,10 +150,10 @@ Locating tasks by description_keyword: find ## Usage It helps to search a task that contain any of the given description_keyword, and the search is case-insensitive. e.g book will match BOOK. Therefore, the user can easily find out the specific task base on find function. ### `find` - Locating tasks with given description_keyword -
:black_medium_small_square:The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. -
:black_medium_small_square:The order of the description_keyword does not matter. -
:black_medium_small_square:If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." -
:black_medium_small_square:If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." +
>The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords. +
>The order of the description_keyword does not matter. +
>If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." +
>If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." **Format**: find description_keyword[more_keyword] @@ -216,15 +216,15 @@ It helps to handle error message that will guid the user. **Expected outcome**:
☹ OOPS!!! I'm sorry, but I don't know what that means :-( -## Command Summary -Action | Format, Examples ------------- | ------------- -Todo | todo Description e.g. todo read book -Deadline | deadline Description /by dd/mm/yyyy HHmm e.g. deadline return book /by 12/12/2019 1800 -Event | event Description /at dd/mm/yyyy HHmm e.g. event join club /by 11/1/2019 1300 -Done | done INDEX e.g. done 1 -Delete | delete INDEX e.g. delete 1 +###### 6 Command Summary +Action | Format | Examples +------------ | --------|----- +Todo | todo Description | e.g. todo read book +Deadline | deadline Description /by dd/mm/yyyy HHmm | e.g. deadline return book /by 12/12/2019 1800 +Event | event Description /at dd/mm/yyyy HHmm | e.g. event join club /by 11/1/2019 1300 +Done | done INDEX | e.g. done 1 +Delete | delete INDEX |e.g. delete 1 List | list -Find | find description_keyword[more_keywords] e.g. find book +Find | find description_keyword[more_keywords] |e.g. find book Exit | exit Bye | bye From 2a671147eba13a384686981f6753454ab373da1c Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:55:29 +0800 Subject: [PATCH 64/94] Update README.md --- docs/README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/README.md b/docs/README.md index 1d9838d2..88dea358 100644 --- a/docs/README.md +++ b/docs/README.md @@ -66,9 +66,9 @@ Adding an event task helps to remember to join or complete the event with specif ### `event` - Adding an event task -
>:The keyword 'event' with description can be **upper and lowercase letters**. +
>The keyword 'event' with description can be **upper and lowercase letters**.
>The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a -
>:If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." +
>If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty."
>If you missing the date and time or /by, there will be an reminder message:"Please specify the event date and time." **Format**: event Description /by dd/mm/yyyy HHmm @@ -132,7 +132,7 @@ Listing all tasks: list It shows a list of all task in the task list with a number. it helps to summarize the task list. ### `list` - Listing all tasks with number.
>The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list -
>:If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." +
>If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." **Format**: list @@ -216,15 +216,15 @@ It helps to handle error message that will guid the user. **Expected outcome**:
☹ OOPS!!! I'm sorry, but I don't know what that means :-( -###### 6 Command Summary +###### Command Summary Action | Format | Examples ------------ | --------|----- -Todo | todo Description | e.g. todo read book -Deadline | deadline Description /by dd/mm/yyyy HHmm | e.g. deadline return book /by 12/12/2019 1800 -Event | event Description /at dd/mm/yyyy HHmm | e.g. event join club /by 11/1/2019 1300 -Done | done INDEX | e.g. done 1 -Delete | delete INDEX |e.g. delete 1 +Todo | todo Description | todo read book +Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800 +Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300 +Done | done INDEX | done 1 +Delete | delete INDEX | delete 1 List | list -Find | find description_keyword[more_keywords] |e.g. find book +Find | find description_keyword[more_keywords] | find book Exit | exit Bye | bye From f8e0a033472a07b3e4f6c1624515591276da680f Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 03:56:03 +0800 Subject: [PATCH 65/94] Update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 88dea358..2720cb4f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -90,7 +90,7 @@ Marking a specific task to remind the user that he has finished the task.
>The keyword 'done' can be **upper and lowercase letters**
>The outcome will be change the X to ✓ in the specific task.
>The index refers to the index number shown in the displayed task list and the index **must be positive integer** 1,2,3... -
>:If you key in the keyword without INDEX. There will be an error message:"please key in correct format." +
>If you key in the keyword without INDEX. There will be an error message:"please key in correct format." **Format**: done INDEX From 1fb673b01b01922416a60d3371d2b8b086ce8c76 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 03:59:04 +0800 Subject: [PATCH 66/94] add readme.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 2720cb4f..1ae165fd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -218,7 +218,7 @@ It helps to handle error message that will guid the user. ###### Command Summary Action | Format | Examples ------------- | --------|----- +-------| -------| ----- Todo | todo Description | todo read book Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800 Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300 From e4b70eaf1f415f8dfd487b9955f03f19818ace77 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 20:41:52 +0800 Subject: [PATCH 67/94] Update README.md --- docs/README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/README.md b/docs/README.md index 1ae165fd..c6fb86f6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ # User Guide -Dukes Project is a program that helps forgetful user to remember things and finish the task before the deadline. +Project Duke is a educational software project that helps user to keep track of various things and finish the task before the deadline. ## Quick start @@ -216,15 +216,15 @@ It helps to handle error message that will guid the user. **Expected outcome**:
☹ OOPS!!! I'm sorry, but I don't know what that means :-( -###### Command Summary -Action | Format | Examples --------| -------| ----- -Todo | todo Description | todo read book -Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800 -Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300 -Done | done INDEX | done 1 -Delete | delete INDEX | delete 1 -List | list -Find | find description_keyword[more_keywords] | find book -Exit | exit -Bye | bye +## Command Summary +|**Action** | **Format** | **Examples**| +-------|:-------:| -----:| +|Todo | todo Description | todo read book| +|Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800| +|Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300| +|Done | done INDEX | done 1| +|Delete | delete INDEX | delete 1| +|List | list| +|Find | find description_keyword[more_keywords] | find book| +|Exit | exit| +|Bye | bye| From b5bf37da60682ba2efe43181530c5fad85f90b60 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:04:12 +0800 Subject: [PATCH 68/94] Update README.md --- docs/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index c6fb86f6..62eea644 100644 --- a/docs/README.md +++ b/docs/README.md @@ -9,11 +9,13 @@ Project Duke is a educational software project that helps user to keep track of 1. Click `Configure` > `Structure for New Projects` and then `Project Settings` > `Project` > `Project SDK` 1. If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11 1. Click `OK` -1. Download the latest project from Github: [links](https://github.com/linqing42/ip). +1. Download the latest project from [here](https://github.com/linqing42/ip). 1. Import the project into Intellij. 1. Go to the sr folder and find src\main\java\Dukes\Duke 1. Right click the Duke and select Run Duke 1. The program now should run on the Console (usually located at the bottom side) +1. Type the command and presse Enter to execute it.
+1.Refer to teh [Feature](#features) below for details of each command. ## Features @@ -217,8 +219,9 @@ It helps to handle error message that will guid the user.
☹ OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary + |**Action** | **Format** | **Examples**| --------|:-------:| -----:| +-------|:-------:| :-----:| |Todo | todo Description | todo read book| |Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800| |Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300| From a1f90f6770fd834577224affdc03258237951a55 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:10:13 +0800 Subject: [PATCH 69/94] Update README.md --- docs/README.md | 72 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/docs/README.md b/docs/README.md index 62eea644..3e4e77e2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -31,13 +31,16 @@ Adding a task in the task list and show the total number of task in the list. Th **Format**: todo Description -**Example of usage**: TOdo Read BOOK - +**Example of usage**: +``` +TOdo Read BOOK +``` **Expected outcome**: +```
Got it. I've added this task:
[T][X] Read BOOK
Now you have [index number] task in the list. - +``` ### Feature 2 Adding a deadline task: deadline @@ -53,13 +56,16 @@ Adding a deadline task helps to know the deadline for the specific task in the t **Format**: deadline Description /by dd/mm/yyyy HHmm -**Example of usage**: deadline return book /by 12/12/2019 1800 - +**Example of usage**: +``` +deadline return book /by 12/12/2019 1800 +``` **Expected outcome**: +```
Got it. I've added this task:
[D][X] return book (by:12 Dec 2019, 06:00 PM)
Now you have [index number] task in the list. - +``` ### Feature 3 Adding an event task: event @@ -75,13 +81,17 @@ Adding an event task helps to remember to join or complete the event with specif **Format**: event Description /by dd/mm/yyyy HHmm -**Example of usage**: EVENT join club /at 12/11/2019 0900 +**Example of usage**: +``` +EVENT join club /at 12/11/2019 0900 +``` **Expected outcome**: +```
Got it. I've added this task:
[E][X] join club (at:12 Nov 2019, 09:00 AM)
Now you have [index number] task in the list. - +``` ### Feature 4 Marking a specific task: done @@ -97,13 +107,15 @@ Marking a specific task to remind the user that he has finished the task. **Format**: done INDEX **Example of usage**: +```
step 1: TODO READ BOOK
step 2: Done 1 or DONE 1 or done 1 - +``` **Expected outcome**: +```
Nice! I've marked this task as done:
[T][✓] READ BOOK - +``` ### Feature 5 Deleting a task: delete @@ -117,16 +129,18 @@ Delete a specific task from task list to helps remove the completed task and tid **Format**: delete INDEX -**Example of usage**: +**Example of usage**: +```
step 1.TODO READ BOOK
step 2: done 1
steps 3:Delete 1 or DELETE 1 or delete 1 - +``` **Expected outcome**: +```
Noted. I've removed this task:
[T][✓] READ BOOK
Now you have [INDEX-1] task in the list. - +``` ### Feature 6 Listing all tasks: list @@ -139,12 +153,15 @@ It shows a list of all task in the task list with a number. it helps to summariz **Format**: list **Example of usage**: +```
step 1.TODO READ BOOK
step 2. list or List or LIST - +``` **Expected outcome**: +```
Here are the tasks in your list:
1.[T][X] READ BOOK +``` ### Feature 7 Locating tasks by description_keyword: find @@ -160,14 +177,16 @@ It helps to search a task that contain any of the given description_keyword, and **Format**: find description_keyword[more_keyword] **Example of usage**: +```
step 1.TODO READ BOOK
step 2. todo join club
step 3. find book or Find BOok or FIND BOOK - +``` **Expected outcome**: +```
Here are the matching tasks in your list:
1.[T][X] READ BOOK - +``` ### Feature 8 Exiting the program: exit/bye @@ -180,46 +199,52 @@ It helps to end the program and display the list of a task will be save in the h **Format**: bye **Example of usage**: +```
step 1.TODO READ BOOK
step 2. todo join club
step 3. bye/exit/BYE/EXIT/Bye/Exit - +``` **Expected outcome**: +```
Your following tasks will be save:
[T][X] READ BOOK
[T][X] join club
Bye. Hope to see you again soon! - +``` ### Feature 9 Saving the task in the hard-disk ## Usage It helps to save the tasks in the hard disk automatically after exiting the program, and the format of display will be change when task save in hard disk. It saves the user's time as there is no need to save manually. **Example of usage**: +```
step 1.todo read book
step 2. deadline return book /by 12/11/2019 1800
step 3. event join club /at 11/2/2020 1300
step 4. done 1
step 5. bye - +``` **Expected outcome**: save into /data/duke.txt +```
T | 1 | read book
D | 0 | return book | 12 Nov 2019, 06:00 PM
E | 0 | join club | 11 Feb 2020, 01:00 PM - +``` ### Feature 10 Exceptions message ## Usage It helps to handle error message that will guid the user. **Example of usage**: +```
read book - +``` **Expected outcome**: +```
☹ OOPS!!! I'm sorry, but I don't know what that means :-( - +``` ## Command Summary - +``` |**Action** | **Format** | **Examples**| -------|:-------:| :-----:| |Todo | todo Description | todo read book| @@ -231,3 +256,4 @@ It helps to handle error message that will guid the user. |Find | find description_keyword[more_keywords] | find book| |Exit | exit| |Bye | bye| +``` From 90d36db50d11bdb422097f3def83cc9e05757193 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:12:51 +0800 Subject: [PATCH 70/94] Update README.md --- docs/README.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/docs/README.md b/docs/README.md index 3e4e77e2..7612de81 100644 --- a/docs/README.md +++ b/docs/README.md @@ -218,17 +218,17 @@ It helps to save the tasks in the hard disk automatically after exiting the prog **Example of usage**: ``` -
step 1.todo read book -
step 2. deadline return book /by 12/11/2019 1800 -
step 3. event join club /at 11/2/2020 1300 -
step 4. done 1 -
step 5. bye + step 1. todo read book + step 2. deadline return book /by 12/11/2019 1800 + step 3. event join club /at 11/2/2020 1300 + step 4. done 1 + step 5. bye ``` **Expected outcome**: save into /data/duke.txt ``` -
T | 1 | read book -
D | 0 | return book | 12 Nov 2019, 06:00 PM -
E | 0 | join club | 11 Feb 2020, 01:00 PM + T | 1 | read book + D | 0 | return book | 12 Nov 2019, 06:00 PM + E | 0 | join club | 11 Feb 2020, 01:00 PM ``` ### Feature 10 Exceptions message @@ -237,14 +237,13 @@ It helps to handle error message that will guid the user. **Example of usage**: ``` -
read book +read book ``` **Expected outcome**: ``` -
☹ OOPS!!! I'm sorry, but I don't know what that means :-( +☹ OOPS!!! I'm sorry, but I don't know what that means :-( ``` ## Command Summary -``` |**Action** | **Format** | **Examples**| -------|:-------:| :-----:| |Todo | todo Description | todo read book| @@ -256,4 +255,3 @@ It helps to handle error message that will guid the user. |Find | find description_keyword[more_keywords] | find book| |Exit | exit| |Bye | bye| -``` From f8083a3a457b58da88c3c97ff435badf070ee32f Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:21:51 +0800 Subject: [PATCH 71/94] Update README.md --- docs/README.md | 60 ++++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7612de81..61978baa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,15 +32,11 @@ Adding a task in the task list and show the total number of task in the list. Th **Format**: todo Description **Example of usage**: -``` TOdo Read BOOK -``` **Expected outcome**: -```
Got it. I've added this task:
[T][X] Read BOOK
Now you have [index number] task in the list. -``` ### Feature 2 Adding a deadline task: deadline @@ -57,15 +53,11 @@ Adding a deadline task helps to know the deadline for the specific task in the t **Format**: deadline Description /by dd/mm/yyyy HHmm **Example of usage**: -``` deadline return book /by 12/12/2019 1800 -``` **Expected outcome**: -```
Got it. I've added this task:
[D][X] return book (by:12 Dec 2019, 06:00 PM)
Now you have [index number] task in the list. -``` ### Feature 3 Adding an event task: event @@ -82,16 +74,15 @@ Adding an event task helps to remember to join or complete the event with specif **Format**: event Description /by dd/mm/yyyy HHmm **Example of usage**: -``` + EVENT join club /at 12/11/2019 0900 -``` + **Expected outcome**: -``` +
Got it. I've added this task:
[E][X] join club (at:12 Nov 2019, 09:00 AM) -
Now you have [index number] task in the list. -``` + ### Feature 4 Marking a specific task: done @@ -107,15 +98,15 @@ Marking a specific task to remind the user that he has finished the task. **Format**: done INDEX **Example of usage**: -``` +
step 1: TODO READ BOOK
step 2: Done 1 or DONE 1 or done 1 -``` + **Expected outcome**: -``` +
Nice! I've marked this task as done:
[T][✓] READ BOOK -``` + ### Feature 5 Deleting a task: delete @@ -130,17 +121,15 @@ Delete a specific task from task list to helps remove the completed task and tid **Format**: delete INDEX **Example of usage**: -```
step 1.TODO READ BOOK
step 2: done 1
steps 3:Delete 1 or DELETE 1 or delete 1 -``` + **Expected outcome**: -```
Noted. I've removed this task:
[T][✓] READ BOOK
Now you have [INDEX-1] task in the list. -``` + ### Feature 6 Listing all tasks: list @@ -153,15 +142,13 @@ It shows a list of all task in the task list with a number. it helps to summariz **Format**: list **Example of usage**: -```
step 1.TODO READ BOOK
step 2. list or List or LIST -``` + **Expected outcome**: -```
Here are the tasks in your list:
1.[T][X] READ BOOK -``` + ### Feature 7 Locating tasks by description_keyword: find @@ -177,16 +164,14 @@ It helps to search a task that contain any of the given description_keyword, and **Format**: find description_keyword[more_keyword] **Example of usage**: -```
step 1.TODO READ BOOK
step 2. todo join club
step 3. find book or Find BOok or FIND BOOK -``` + **Expected outcome**: -```
Here are the matching tasks in your list:
1.[T][X] READ BOOK -``` + ### Feature 8 Exiting the program: exit/bye @@ -199,50 +184,43 @@ It helps to end the program and display the list of a task will be save in the h **Format**: bye **Example of usage**: -```
step 1.TODO READ BOOK
step 2. todo join club
step 3. bye/exit/BYE/EXIT/Bye/Exit -``` + **Expected outcome**: -```
Your following tasks will be save:
[T][X] READ BOOK
[T][X] join club
Bye. Hope to see you again soon! -``` + ### Feature 9 Saving the task in the hard-disk ## Usage It helps to save the tasks in the hard disk automatically after exiting the program, and the format of display will be change when task save in hard disk. It saves the user's time as there is no need to save manually. **Example of usage**: -``` step 1. todo read book step 2. deadline return book /by 12/11/2019 1800 step 3. event join club /at 11/2/2020 1300 step 4. done 1 step 5. bye -``` **Expected outcome**: save into /data/duke.txt -``` T | 1 | read book D | 0 | return book | 12 Nov 2019, 06:00 PM E | 0 | join club | 11 Feb 2020, 01:00 PM -``` ### Feature 10 Exceptions message ## Usage It helps to handle error message that will guid the user. **Example of usage**: -``` read book -``` + **Expected outcome**: -``` + ☹ OOPS!!! I'm sorry, but I don't know what that means :-( -``` + ## Command Summary |**Action** | **Format** | **Examples**| -------|:-------:| :-----:| From c333e8db97d22bdc7690c420d786f9f35fa41589 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:25:21 +0800 Subject: [PATCH 72/94] Update README.md --- docs/README.md | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/docs/README.md b/docs/README.md index 61978baa..6a69e18a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,11 +32,13 @@ Adding a task in the task list and show the total number of task in the list. Th **Format**: todo Description **Example of usage**: -TOdo Read BOOK +
TOdo Read BOOK + **Expected outcome**:
Got it. I've added this task:
[T][X] Read BOOK
Now you have [index number] task in the list. + ### Feature 2 Adding a deadline task: deadline @@ -53,11 +55,13 @@ Adding a deadline task helps to know the deadline for the specific task in the t **Format**: deadline Description /by dd/mm/yyyy HHmm **Example of usage**: -deadline return book /by 12/12/2019 1800 +
deadline return book /by 12/12/2019 1800 + **Expected outcome**:
Got it. I've added this task:
[D][X] return book (by:12 Dec 2019, 06:00 PM)
Now you have [index number] task in the list. + ### Feature 3 Adding an event task: event @@ -65,7 +69,6 @@ Adding an event task: event Adding an event task helps to remember to join or complete the event with specific date and time in the task list and show the total number of task in the list. ### `event` - Adding an event task -
>The keyword 'event' with description can be **upper and lowercase letters**.
>The outcome will not include the keyword with date adn time format: dd MMM yyyy, hh:mm a
>If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a event cannot be empty." @@ -74,12 +77,9 @@ Adding an event task helps to remember to join or complete the event with specif **Format**: event Description /by dd/mm/yyyy HHmm **Example of usage**: - -EVENT join club /at 12/11/2019 0900 - +
EVENT join club /at 12/11/2019 0900 **Expected outcome**: -
Got it. I've added this task:
[E][X] join club (at:12 Nov 2019, 09:00 AM) @@ -98,12 +98,10 @@ Marking a specific task to remind the user that he has finished the task. **Format**: done INDEX **Example of usage**: -
step 1: TODO READ BOOK
step 2: Done 1 or DONE 1 or done 1 **Expected outcome**: -
Nice! I've marked this task as done:
[T][✓] READ BOOK @@ -135,6 +133,7 @@ Listing all tasks: list ## Usage It shows a list of all task in the task list with a number. it helps to summarize the task list. + ### `list` - Listing all tasks with number.
>The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list
>If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." @@ -196,30 +195,33 @@ It helps to end the program and display the list of a task will be save in the h ### Feature 9 Saving the task in the hard-disk + ## Usage It helps to save the tasks in the hard disk automatically after exiting the program, and the format of display will be change when task save in hard disk. It saves the user's time as there is no need to save manually. **Example of usage**: - step 1. todo read book - step 2. deadline return book /by 12/11/2019 1800 - step 3. event join club /at 11/2/2020 1300 - step 4. done 1 - step 5. bye +
step 1. todo read book +
step 2. deadline return book /by 12/11/2019 1800 +
step 3. event join club /at 11/2/2020 1300 +
step 4. done 1 +
step 5. bye + **Expected outcome**: save into /data/duke.txt - T | 1 | read book - D | 0 | return book | 12 Nov 2019, 06:00 PM - E | 0 | join club | 11 Feb 2020, 01:00 PM +
T | 1 | read book +
D | 0 | return book | 12 Nov 2019, 06:00 PM +
E | 0 | join club | 11 Feb 2020, 01:00 PM + ### Feature 10 Exceptions message + ## Usage It helps to handle error message that will guid the user. **Example of usage**: -read book +
read book **Expected outcome**: - -☹ OOPS!!! I'm sorry, but I don't know what that means :-( +
☹ OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary |**Action** | **Format** | **Examples**| From 774a8d21d81ee532855973f8ab042d9d34f44003 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 21:28:40 +0800 Subject: [PATCH 73/94] add readme.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 1ae165fd..27d97a4f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -216,7 +216,7 @@ It helps to handle error message that will guid the user. **Expected outcome**:
☹ OOPS!!! I'm sorry, but I don't know what that means :-( -###### Command Summary +#Command Summary Action | Format | Examples -------| -------| ----- Todo | todo Description | todo read book From aff075338d9b4633af6baa3adb1fa7c7af6cb9dc Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 21:51:42 +0800 Subject: [PATCH 74/94] update --- data/duke.txt | 4 ++-- src/main/java/Dukes/storage/Storage.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data/duke.txt b/data/duke.txt index e4b1b4bf..bef6dd1e 100644 --- a/data/duke.txt +++ b/data/duke.txt @@ -1,3 +1,3 @@ T | 1 | read book -D | 0 | return book | 12 Nov 2019, 06:00 PM -E | 0 | join club | 11 Feb 2020, 01:00 PM +D | 0 | return book | 12 Dec 2019, 06:00 PM +E | 0 | join club | 11 Jan 2020, 09:00 AM diff --git a/src/main/java/Dukes/storage/Storage.java b/src/main/java/Dukes/storage/Storage.java index ca882aaf..f042da0f 100644 --- a/src/main/java/Dukes/storage/Storage.java +++ b/src/main/java/Dukes/storage/Storage.java @@ -17,14 +17,15 @@ */ public class Storage { private ArrayList details = new ArrayList<>(); - public static String filePath = "data/duke.txt"; + public static String path = "data/duke.txt"; public Storage(String path) { + this.path = path; } public ArrayList load() throws Dukes.Exceptions.FileNotFoundException { try { - File file = new File(filePath); + File file = new File(path); file.createNewFile(); Scanner in = new Scanner(file); while (in.hasNext()) { From 591934961e63bce9e1e880f0a79240354cde2922 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 23:11:12 +0800 Subject: [PATCH 75/94] final jar --- data/duke.txt | 3 --- docs/README.md | 6 +++--- src/main/java/Dukes/Duke.java | 16 +++++++--------- .../Dukes/Exceptions/FileNotFoundException.java | 2 -- src/main/java/Dukes/Tasks/Deadline.java | 4 ---- src/main/java/Dukes/Tasks/TaskList.java | 1 - src/main/java/Dukes/Ui.java | 6 +++--- src/main/java/Dukes/parser/Parser.java | 2 -- 8 files changed, 13 insertions(+), 27 deletions(-) delete mode 100644 data/duke.txt diff --git a/data/duke.txt b/data/duke.txt deleted file mode 100644 index bef6dd1e..00000000 --- a/data/duke.txt +++ /dev/null @@ -1,3 +0,0 @@ -T | 1 | read book -D | 0 | return book | 12 Dec 2019, 06:00 PM -E | 0 | join club | 11 Jan 2020, 09:00 AM diff --git a/docs/README.md b/docs/README.md index 6a69e18a..c604faf8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ # User Guide -Project Duke is a educational software project that helps user to keep track of various things and finish the task before the deadline. +Project Dukes.Duke is a educational software project that helps user to keep track of various things and finish the task before the deadline. ## Quick start @@ -11,8 +11,8 @@ Project Duke is a educational software project that helps user to keep track of 1. Click `OK` 1. Download the latest project from [here](https://github.com/linqing42/ip). 1. Import the project into Intellij. -1. Go to the sr folder and find src\main\java\Dukes\Duke -1. Right click the Duke and select Run Duke +1. Go to the sr folder and find src\main\java\Dukes\Dukes.Duke +1. Right click the Dukes.Duke and select Run Dukes.Duke 1. The program now should run on the Console (usually located at the bottom side) 1. Type the command and presse Enter to execute it.
1.Refer to teh [Feature](#features) below for details of each command. diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index 3a88e694..e23401f9 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -1,4 +1,5 @@ package Dukes; + import Dukes.Exceptions.DukeException; import Dukes.Tasks.TaskList; import Dukes.command.Command; @@ -7,21 +8,20 @@ /** - * The Duke program implements an application that can store a list of task,save to a txt file. + * The Dukes.Duke program implements an application that can store a list of task,save to a txt file. * and print the task on the screen. - * it link to other classes which is an member for Duke such as Storage, Task and Ui Class + * it link to other classes which is an member for Dukes.Duke such as Storage, Task and Ui Class * * @author LIN QING * @version 1.0 * @since 14/9/2020 */ public class Duke { - private Storage storage; + private final Storage storage; private TaskList tasks; - private Ui ui; + private final Ui ui; /** * @param path program will store the task in this path - * @throws DukeException if problem reading file. */ public Duke(String path) { ui = new Ui(); @@ -36,9 +36,7 @@ public Duke(String path) { /** * run program implements an application that simply shows the tasks and print on the screen - * - * @return task and the number of task in the list - * @throws DukeExceptionException if the command word not in the case. + * DukeException if the command word not in the case. */ public void run() { ui.printWelcome(); @@ -58,7 +56,7 @@ public void run() { } } /** - * This is main method which made use of Duke and run methods + * This is main method which made use of Dukes.Duke and run methods */ public static void main(String[] args){ assert (args.length) > 0; diff --git a/src/main/java/Dukes/Exceptions/FileNotFoundException.java b/src/main/java/Dukes/Exceptions/FileNotFoundException.java index fa909f73..41716894 100644 --- a/src/main/java/Dukes/Exceptions/FileNotFoundException.java +++ b/src/main/java/Dukes/Exceptions/FileNotFoundException.java @@ -1,7 +1,5 @@ package Dukes.Exceptions; -import Dukes.Exceptions.DukeException; - /** * Represents a checked exception. * A FileNotFoundException object corresponds to an exception that is thrown where file are invalid or diff --git a/src/main/java/Dukes/Tasks/Deadline.java b/src/main/java/Dukes/Tasks/Deadline.java index fedadfdf..c599665b 100644 --- a/src/main/java/Dukes/Tasks/Deadline.java +++ b/src/main/java/Dukes/Tasks/Deadline.java @@ -1,9 +1,5 @@ package Dukes.Tasks; - -import java.text.SimpleDateFormat; -import java.util.Date; - /** * deadline task description /by specific date and time e.g. return book by 12/12/2019 1800. * diff --git a/src/main/java/Dukes/Tasks/TaskList.java b/src/main/java/Dukes/Tasks/TaskList.java index 14716132..9fa2b11d 100644 --- a/src/main/java/Dukes/Tasks/TaskList.java +++ b/src/main/java/Dukes/Tasks/TaskList.java @@ -1,6 +1,5 @@ package Dukes.Tasks; - import java.util.ArrayList; /** diff --git a/src/main/java/Dukes/Ui.java b/src/main/java/Dukes/Ui.java index c6daee06..c961c36e 100644 --- a/src/main/java/Dukes/Ui.java +++ b/src/main/java/Dukes/Ui.java @@ -15,7 +15,7 @@ public class Ui { * Reads user input. * @return User input. */ - String readCommand() { + public String readCommand() { return in.nextLine(); } @@ -30,7 +30,7 @@ public void showError(String message) { System.out.println(message); } /** - * Prints the Duke logo and greets the user for the first time the program is run. + * Prints the Dukes.Duke logo and greets the user for the first time the program is run. */ public void printWelcome() { String logo = " ____ _ \n" @@ -39,7 +39,7 @@ public void printWelcome() { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n"; System.out.println("Hello from\n" + logo); - System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + System.out.println("Hello! I'm Dukes\nWhat can I do for you?\n"); } /** diff --git a/src/main/java/Dukes/parser/Parser.java b/src/main/java/Dukes/parser/Parser.java index d2f6a5c3..6235833f 100644 --- a/src/main/java/Dukes/parser/Parser.java +++ b/src/main/java/Dukes/parser/Parser.java @@ -9,8 +9,6 @@ import Dukes.command.*; import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.format.DateTimeFormatter; import java.util.Date; /** From 7e66ff58509305f774f964dc1491fd88cd5a1b28 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 23:17:53 +0800 Subject: [PATCH 76/94] final jar --- src/main/java/Dukes/parser/Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/parser/Parser.java b/src/main/java/Dukes/parser/Parser.java index 6235833f..89f448a7 100644 --- a/src/main/java/Dukes/parser/Parser.java +++ b/src/main/java/Dukes/parser/Parser.java @@ -65,7 +65,7 @@ public static Command parse(String input) throws DukeException { } String[] splitDetail = input.split("/by"); if (splitDetail.length < 2) { - throw new DukeException("Please specify the deadline date and time\n"); + throw new DukeException("Please specify the deadline date and time.\n"); } String task = splitDetail[0].substring(9); String by = splitDetail[1]; From eefb89e21ff69bff8c018e56762d262b77e3650f Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 23:18:10 +0800 Subject: [PATCH 77/94] final jar --- data/duke.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/duke.txt diff --git a/data/duke.txt b/data/duke.txt new file mode 100644 index 00000000..be5d5973 --- /dev/null +++ b/data/duke.txt @@ -0,0 +1,3 @@ +T | 0 | read book +D | 1 | return book | 12 Dec 2019, 06:00 PM +E | 0 | join club | 11 Jan 2020, 09:00 AM From 900dfe97766e0fad2733bb2245b271d2e343c653 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 21 Sep 2020 23:40:08 +0800 Subject: [PATCH 78/94] final jar --- src/main/java/Dukes/Exceptions/DukeException.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/Dukes/Exceptions/DukeException.java b/src/main/java/Dukes/Exceptions/DukeException.java index 4847df81..d7484d74 100644 --- a/src/main/java/Dukes/Exceptions/DukeException.java +++ b/src/main/java/Dukes/Exceptions/DukeException.java @@ -1,8 +1,8 @@ package Dukes.Exceptions; /** * Represents a checked exception. - * A DukeException object corresponds to an exception that is thrown when user inputs are invalid or - * have the wrong format. + * A DukeException object corresponds to an exception that is thrown when user inputs are invalid or contain + * the wrong format. */ public class DukeException extends Exception { public DukeException(String message) { From 9fee6bc71f18531d438c92e1c5d4731842310c5a Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 23:50:46 +0800 Subject: [PATCH 79/94] Update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index c604faf8..fe64289b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,5 @@ # User Guide -Project Dukes.Duke is a educational software project that helps user to keep track of various things and finish the task before the deadline. +Project Dukes.Duke is a educational software project that helps user to keep track of various things and try to finish the task before the deadline. ## Quick start From 7959f2bc4ee2e25c6842d555159b01e0cfa5a191 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Mon, 21 Sep 2020 23:54:06 +0800 Subject: [PATCH 80/94] Update Parser.java --- src/main/java/Dukes/parser/Parser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/parser/Parser.java b/src/main/java/Dukes/parser/Parser.java index 89f448a7..0a13ec45 100644 --- a/src/main/java/Dukes/parser/Parser.java +++ b/src/main/java/Dukes/parser/Parser.java @@ -105,7 +105,7 @@ public static Command parse(String input) throws DukeException { c = new FindCommand(keyword); break; } catch (NumberFormatException e) { - throw new DukeException("please key in correct format"); + throw new DukeException("please key in correct format."); } case "bye": From 121153712562d77bb6349e1fba641c11dd29a9ce Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Tue, 22 Sep 2020 12:35:37 +0800 Subject: [PATCH 81/94] Update README.md --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index fe64289b..0ca41e6c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -177,10 +177,10 @@ Exiting the program: exit/bye ## Usage It helps to end the program and display the list of a task will be save in the hard disk. ### `exit/bye` - Exiting the program -
The keyword 'exit/by' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. +
The keyword 'exit/bye' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. **Format**: exit -**Format**: bye +
**Format**: bye **Example of usage**:
step 1.TODO READ BOOK From 192ff602a22cbc25e07a8915b3a3b3c99ab4b0be Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 22 Sep 2020 12:47:21 +0800 Subject: [PATCH 82/94] update README.md --- docs/README.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/docs/README.md b/docs/README.md index fe64289b..7c9d2714 100644 --- a/docs/README.md +++ b/docs/README.md @@ -177,10 +177,10 @@ Exiting the program: exit/bye ## Usage It helps to end the program and display the list of a task will be save in the hard disk. ### `exit/bye` - Exiting the program -
The keyword 'exit/by' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. +
The keyword 'exit/bye' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list that will be save in hard disk and a bye message. **Format**: exit -**Format**: bye +
**Format**: bye **Example of usage**:
step 1.TODO READ BOOK @@ -224,14 +224,5 @@ It helps to handle error message that will guid the user.
☹ OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary -|**Action** | **Format** | **Examples**| --------|:-------:| :-----:| -|Todo | todo Description | todo read book| -|Deadline | deadline Description /by dd/mm/yyyy HHmm | deadline return book /by 12/12/2019 1800| -|Event | event Description /at dd/mm/yyyy HHmm | event join club /by 11/1/2019 1300| -|Done | done INDEX | done 1| -|Delete | delete INDEX | delete 1| -|List | list| -|Find | find description_keyword[more_keywords] | find book| -|Exit | exit| -|Bye | bye| +![image of Command Summary](Command Summary.PNG) + From 6f5fe6d8e95df61fb029ef9aaab9c6f4d159b617 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 22 Sep 2020 12:49:34 +0800 Subject: [PATCH 83/94] update README.md --- docs/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7c9d2714..dd428c23 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,5 @@ # User Guide -Project Dukes.Duke is a educational software project that helps user to keep track of various things and try to finish the task before the deadline. - +Project Dukes.Duke is a educational software project that helps user to keep track of various things. ## Quick start 1. Ensure you have Java 11 or above installed in your Computer @@ -224,5 +223,6 @@ It helps to handle error message that will guid the user.
☹ OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary + ![image of Command Summary](Command Summary.PNG) From 6fd780277c222c98650a8e3866462a4c0998c467 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 22 Sep 2020 12:50:06 +0800 Subject: [PATCH 84/94] update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index dd428c23..2b94cf72 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ Project Dukes.Duke is a educational software project that helps user to keep tra 1. Go to the sr folder and find src\main\java\Dukes\Dukes.Duke 1. Right click the Dukes.Duke and select Run Dukes.Duke 1. The program now should run on the Console (usually located at the bottom side) -1. Type the command and presse Enter to execute it.
+1. Type the command and press Enter to execute it.
1.Refer to teh [Feature](#features) below for details of each command. ## Features From 61340e312fcc3cd7007834402cc260bd680faa51 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Tue, 22 Sep 2020 12:53:07 +0800 Subject: [PATCH 85/94] update README.md --- docs/Command Summary.PNG | Bin 0 -> 19703 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/Command Summary.PNG diff --git a/docs/Command Summary.PNG b/docs/Command Summary.PNG new file mode 100644 index 0000000000000000000000000000000000000000..eea01f377579e9eda57adbac87becdf1a1041c8a GIT binary patch literal 19703 zcmeIa2T)V*w=RqzqJW@+fYL;yi8RsBgMbvJ+vo%VL4i;uNJ%21Aksm4w;_V`UJ{Tl zB?>|yp-4-p2{i$dz>WO=|9gJ-d^2axoHO^Fb7#KHFzl4Q_xrBB-u13$t!J%BGZX!j ztmj!77#L38GPrq%fq{vSf#FER@niH)6bHAk^nXYE?&xbXlne+g(%&3))iTy%U?`7c zqdsJ&zdzw^VCBcaaOUZszax__!p|5OjG}Md)VlY~el>flNUY1BNEB9-3v&>x=cimG5@r{>v&lO1s=ZQ$Qz36 zN1aN_>kLSb9FDQ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tUUm3+g3k-`}cqUy68}NnS;=B<8-TV#*XOW&$~M*Kz6U@?-*JXBjWW zncIADUS-VUJRI(y4i*wA-wV=wv_v??33u<(KVWdx*-z4osLSEze)oILr=(Msj>3)} z3WdZPowIV+Xfyfq+I`kd;zD!P&SQGVBTE)Gx-G$U)b0k{+lrcDa)>#U5Jpn|U0YCPD0338FgspK!Q*`nl-ru?P?t#J4@!*8>R0oC{wtwmZ$LPg( z{ofu+c|gi^H%iqRJr1?NgxZf39>( M*W_l2w!@461+^ Date: Tue, 22 Sep 2020 13:05:55 +0800 Subject: [PATCH 86/94] Update README.md add link for product user guid --- docs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/README.md b/docs/README.md index 2b94cf72..244fa21b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,7 @@ # User Guide Project Dukes.Duke is a educational software project that helps user to keep track of various things. +
The link is [website for product user guid ](https://linqing42.github.io/ip/) + ## Quick start 1. Ensure you have Java 11 or above installed in your Computer From cedea37383bf085e535302af1f4eacd875f77b0f Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:35:40 +0800 Subject: [PATCH 87/94] Update and rename README.md to linqing.md --- README.md | 26 ------------------------ linqing.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 26 deletions(-) delete mode 100644 README.md create mode 100644 linqing.md diff --git a/README.md b/README.md deleted file mode 100644 index f9ba907e..00000000 --- a/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# Dukes.Duke project template - -This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. - -## Setting up in Intellij - -Prerequisites: JDK 11, update Intellij to the most recent version. - -1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first) -1. Set up the correct JDK version, as follows: - 1. Click `Configure` > `Structure for New Projects` and then `Project Settings` > `Project` > `Project SDK` - 1. If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11 - 1. Click `OK` -1. Import the project into Intellij as follows: - 1. Click `Open or Import`. - 1. Select the project directory, and click `OK` - 1. If there are any further prompts, accept the defaults. -1. After the importing is complete, locate the `src/main/java/Dukes.Duke.java` file, right-click it, and choose `Run Dukes.Duke.main()`. If the setup is correct, you should see something like the below: - ``` - Hello from - ____ _ - | _ \ _ _| | _____ - | | | | | | | |/ / _ \ - | |_| | |_| | < __/ - |____/ \__,_|_|\_\___| - ``` diff --git a/linqing.md b/linqing.md new file mode 100644 index 00000000..f048a55f --- /dev/null +++ b/linqing.md @@ -0,0 +1,59 @@ +# Lin Qing - Project Portfolio Page + +## Overview +### Project: Project Tracker +Project Tracker is a desktop app for managing and tracking projects, optimized for use via a Command Line Interface (CLI). + +### Summary of Contributions + +Given below are my contributions to the + +- Add Find Command: Added the ability to find the word in the project and allows the user to easily find the specific project[#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) +- Add Complete command: Added the ability to mark the project is completed and store in project.txt[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Add project-in-charge: add the project information [#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) +- Add client: add the project information[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) +- Add email address: add the project information [#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) +- Add status of the project: add the status to show in the project[#56](https://github.com/AY2021S1-TIC4001-1/tp/pull/56) +- Add J-unit test: CompleteTest [#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) + +### Code contributed: +[RepoSense link](https://nus-tic4001-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=QING&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByAuthors&checkedFileTypes=docs~functional-code~test-code~other&tabOpen=true&tabType=authorship&tabAuthor=linqing42&tabRepo=AY2021S1-TIC4001-1%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code) +### Project management +- Managed releases ```v1.0``` - ```v3.0``` (3 releases) on Github +### Enhancements to existing features: + +- Update the project feature [#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Storage feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Create feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update Parser[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Add feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Tracker +- Update the Expected.TXT (text-ui-test)[#84](https://github.com/AY2021S1-TIC4001-1/tp/pull/84) +- Update the UI feature such as printHelp(),displayProject()[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the StorageTest, projectsListTest, Ui Test[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) + +### Documentation: +#### User Guide: +- Create documents and add website link: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) +- Added following features in the documentation: `help`, `create`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing documentation of features: `create`, `help`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#7](https://github.com/AY2021S1-TIC4001-1/tp/pull/7/commits/9ba7a90287c5e5a49ec66430d456a901fc9f34a2),[#9](https://github.com/AY2021S1-TIC4001-1/tp/pull/9),[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#70](https://github.com/AY2021S1-TIC4001-1/tp/pull/70),[#75](https://github.com/AY2021S1-TIC4001-1/tp/pull/75) +#### Developer Guide: +- Added all implementation details: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Create & Draw a Sequence Diagram in Storage Command(getLines(stringe fileName) methods)[#91](https://github.com/AY2021S1-TIC4001-1/tp/pull/91),[#92](https://github.com/AY2021S1-TIC4001-1/tp/pull/92) +- Create & Draw UML class diagrams in Version 1 (Parser,Storage, Ui,Tracker, Command,Help, Add, Invalid, List,Create, Delete, Find, Exit, Project, ProjectList, NewProject, Exception, TrackerException and Edit Diagram) using Cacoo website, but expiry in 14 days, so change to Draw io and manually copy one by one, the UML class diagram Version 1 into the draw io table[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits), [#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing UML diagram and create Version 2 using draw io. (Parser,Storage,Ui,Tracker,Command,Help, Add, Invalid,List,Create,Delete, Find, Exit,Project, ProjectList, NewProject,Exception, TrackerException and Edit Diagram) and add a new class diagram in Version 2 which is Complete Diagram:[#58](https://github.com/AY2021S1-TIC4001-1/tp/pull/58/commits),[#69](https://github.com/AY2021S1-TIC4001-1/tp/pull/69),[#74](https://github.com/AY2021S1-TIC4001-1/tp/pull/74),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing documentation[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) + +#### Read.me +- Put Product introduction and useful links for UG and DG[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495) + +### Contributions to team-based tasks : + +- Maintaining the issue tracker such as create issue tracker in version 2 and close the issue tracker in version 1, and put a remark on it. +- Create and include all Developer document: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Create and include all User Guide documents: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) +- Create draw io and invite my teammembers + +### Community: +- PRs reviewed (with non-trivial review comments):[#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12),[#77](https://github.com/AY2021S1-TIC4001-1/tp/issues/77),[#42](https://github.com/AY2021S1-TIC4001-1/tp/issues/42) +- Reported bugs: [#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12) From b66dba0261a8a40f09edcae7c8ecc7c4af93fba0 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:36:41 +0800 Subject: [PATCH 88/94] Create linqing.md --- docs/linqing.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/linqing.md diff --git a/docs/linqing.md b/docs/linqing.md new file mode 100644 index 00000000..f048a55f --- /dev/null +++ b/docs/linqing.md @@ -0,0 +1,59 @@ +# Lin Qing - Project Portfolio Page + +## Overview +### Project: Project Tracker +Project Tracker is a desktop app for managing and tracking projects, optimized for use via a Command Line Interface (CLI). + +### Summary of Contributions + +Given below are my contributions to the + +- Add Find Command: Added the ability to find the word in the project and allows the user to easily find the specific project[#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) +- Add Complete command: Added the ability to mark the project is completed and store in project.txt[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Add project-in-charge: add the project information [#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) +- Add client: add the project information[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) +- Add email address: add the project information [#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) +- Add status of the project: add the status to show in the project[#56](https://github.com/AY2021S1-TIC4001-1/tp/pull/56) +- Add J-unit test: CompleteTest [#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) + +### Code contributed: +[RepoSense link](https://nus-tic4001-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=QING&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByAuthors&checkedFileTypes=docs~functional-code~test-code~other&tabOpen=true&tabType=authorship&tabAuthor=linqing42&tabRepo=AY2021S1-TIC4001-1%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code) +### Project management +- Managed releases ```v1.0``` - ```v3.0``` (3 releases) on Github +### Enhancements to existing features: + +- Update the project feature [#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Storage feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Create feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update Parser[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Add feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the Tracker +- Update the Expected.TXT (text-ui-test)[#84](https://github.com/AY2021S1-TIC4001-1/tp/pull/84) +- Update the UI feature such as printHelp(),displayProject()[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) +- Update the StorageTest, projectsListTest, Ui Test[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) + +### Documentation: +#### User Guide: +- Create documents and add website link: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) +- Added following features in the documentation: `help`, `create`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing documentation of features: `create`, `help`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#7](https://github.com/AY2021S1-TIC4001-1/tp/pull/7/commits/9ba7a90287c5e5a49ec66430d456a901fc9f34a2),[#9](https://github.com/AY2021S1-TIC4001-1/tp/pull/9),[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#70](https://github.com/AY2021S1-TIC4001-1/tp/pull/70),[#75](https://github.com/AY2021S1-TIC4001-1/tp/pull/75) +#### Developer Guide: +- Added all implementation details: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Create & Draw a Sequence Diagram in Storage Command(getLines(stringe fileName) methods)[#91](https://github.com/AY2021S1-TIC4001-1/tp/pull/91),[#92](https://github.com/AY2021S1-TIC4001-1/tp/pull/92) +- Create & Draw UML class diagrams in Version 1 (Parser,Storage, Ui,Tracker, Command,Help, Add, Invalid, List,Create, Delete, Find, Exit, Project, ProjectList, NewProject, Exception, TrackerException and Edit Diagram) using Cacoo website, but expiry in 14 days, so change to Draw io and manually copy one by one, the UML class diagram Version 1 into the draw io table[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits), [#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing UML diagram and create Version 2 using draw io. (Parser,Storage,Ui,Tracker,Command,Help, Add, Invalid,List,Create,Delete, Find, Exit,Project, ProjectList, NewProject,Exception, TrackerException and Edit Diagram) and add a new class diagram in Version 2 which is Complete Diagram:[#58](https://github.com/AY2021S1-TIC4001-1/tp/pull/58/commits),[#69](https://github.com/AY2021S1-TIC4001-1/tp/pull/69),[#74](https://github.com/AY2021S1-TIC4001-1/tp/pull/74),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Did cosmetic tweaks to existing documentation[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) + +#### Read.me +- Put Product introduction and useful links for UG and DG[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495) + +### Contributions to team-based tasks : + +- Maintaining the issue tracker such as create issue tracker in version 2 and close the issue tracker in version 1, and put a remark on it. +- Create and include all Developer document: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) +- Create and include all User Guide documents: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) +- Create draw io and invite my teammembers + +### Community: +- PRs reviewed (with non-trivial review comments):[#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12),[#77](https://github.com/AY2021S1-TIC4001-1/tp/issues/77),[#42](https://github.com/AY2021S1-TIC4001-1/tp/issues/42) +- Reported bugs: [#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12) From 74bb16e6a4d40e2a8260e3522c901ea8a016e117 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:41:24 +0800 Subject: [PATCH 89/94] Delete linqing.md --- docs/linqing.md | 59 ------------------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 docs/linqing.md diff --git a/docs/linqing.md b/docs/linqing.md deleted file mode 100644 index f048a55f..00000000 --- a/docs/linqing.md +++ /dev/null @@ -1,59 +0,0 @@ -# Lin Qing - Project Portfolio Page - -## Overview -### Project: Project Tracker -Project Tracker is a desktop app for managing and tracking projects, optimized for use via a Command Line Interface (CLI). - -### Summary of Contributions - -Given below are my contributions to the - -- Add Find Command: Added the ability to find the word in the project and allows the user to easily find the specific project[#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) -- Add Complete command: Added the ability to mark the project is completed and store in project.txt[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Add project-in-charge: add the project information [#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) -- Add client: add the project information[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) -- Add email address: add the project information [#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) -- Add status of the project: add the status to show in the project[#56](https://github.com/AY2021S1-TIC4001-1/tp/pull/56) -- Add J-unit test: CompleteTest [#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) - -### Code contributed: -[RepoSense link](https://nus-tic4001-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=QING&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByAuthors&checkedFileTypes=docs~functional-code~test-code~other&tabOpen=true&tabType=authorship&tabAuthor=linqing42&tabRepo=AY2021S1-TIC4001-1%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code) -### Project management -- Managed releases ```v1.0``` - ```v3.0``` (3 releases) on Github -### Enhancements to existing features: - -- Update the project feature [#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Storage feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Create feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update Parser[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Add feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Tracker -- Update the Expected.TXT (text-ui-test)[#84](https://github.com/AY2021S1-TIC4001-1/tp/pull/84) -- Update the UI feature such as printHelp(),displayProject()[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the StorageTest, projectsListTest, Ui Test[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) - -### Documentation: -#### User Guide: -- Create documents and add website link: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) -- Added following features in the documentation: `help`, `create`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing documentation of features: `create`, `help`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#7](https://github.com/AY2021S1-TIC4001-1/tp/pull/7/commits/9ba7a90287c5e5a49ec66430d456a901fc9f34a2),[#9](https://github.com/AY2021S1-TIC4001-1/tp/pull/9),[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#70](https://github.com/AY2021S1-TIC4001-1/tp/pull/70),[#75](https://github.com/AY2021S1-TIC4001-1/tp/pull/75) -#### Developer Guide: -- Added all implementation details: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Create & Draw a Sequence Diagram in Storage Command(getLines(stringe fileName) methods)[#91](https://github.com/AY2021S1-TIC4001-1/tp/pull/91),[#92](https://github.com/AY2021S1-TIC4001-1/tp/pull/92) -- Create & Draw UML class diagrams in Version 1 (Parser,Storage, Ui,Tracker, Command,Help, Add, Invalid, List,Create, Delete, Find, Exit, Project, ProjectList, NewProject, Exception, TrackerException and Edit Diagram) using Cacoo website, but expiry in 14 days, so change to Draw io and manually copy one by one, the UML class diagram Version 1 into the draw io table[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits), [#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing UML diagram and create Version 2 using draw io. (Parser,Storage,Ui,Tracker,Command,Help, Add, Invalid,List,Create,Delete, Find, Exit,Project, ProjectList, NewProject,Exception, TrackerException and Edit Diagram) and add a new class diagram in Version 2 which is Complete Diagram:[#58](https://github.com/AY2021S1-TIC4001-1/tp/pull/58/commits),[#69](https://github.com/AY2021S1-TIC4001-1/tp/pull/69),[#74](https://github.com/AY2021S1-TIC4001-1/tp/pull/74),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing documentation[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) - -#### Read.me -- Put Product introduction and useful links for UG and DG[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495) - -### Contributions to team-based tasks : - -- Maintaining the issue tracker such as create issue tracker in version 2 and close the issue tracker in version 1, and put a remark on it. -- Create and include all Developer document: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Create and include all User Guide documents: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) -- Create draw io and invite my teammembers - -### Community: -- PRs reviewed (with non-trivial review comments):[#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12),[#77](https://github.com/AY2021S1-TIC4001-1/tp/issues/77),[#42](https://github.com/AY2021S1-TIC4001-1/tp/issues/42) -- Reported bugs: [#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12) From 21d6ea2a59d889528c5a59fef5663ead3e462cb2 Mon Sep 17 00:00:00 2001 From: linqing42 <44344087+linqing42@users.noreply.github.com> Date: Fri, 13 Nov 2020 22:42:24 +0800 Subject: [PATCH 90/94] Update and rename linqing.md to ReadMe.md --- ReadMe.md | 26 ++++++++++++++++++++++++ linqing.md | 59 ------------------------------------------------------ 2 files changed, 26 insertions(+), 59 deletions(-) create mode 100644 ReadMe.md delete mode 100644 linqing.md diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 00000000..9d95025b --- /dev/null +++ b/ReadMe.md @@ -0,0 +1,26 @@ +# Duke project template + +This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. + +## Setting up in Intellij + +Prerequisites: JDK 11, update Intellij to the most recent version. + +1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first) +1. Set up the correct JDK version, as follows: + 1. Click `Configure` > `Structure for New Projects` and then `Project Settings` > `Project` > `Project SDK` + 1. If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11 + 1. Click `OK` +1. Import the project into Intellij as follows: + 1. Click `Open or Import`. + 1. Select the project directory, and click `OK` + 1. If there are any further prompts, accept the defaults. +1. After the importing is complete, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()`. If the setup is correct, you should see something like the below: + ``` + Hello from + ____ _ + | _ \ _ _| | _____ + | | | | | | | |/ / _ \ + | |_| | |_| | < __/ + |____/ \__,_|_|\_\___| + ``` diff --git a/linqing.md b/linqing.md deleted file mode 100644 index f048a55f..00000000 --- a/linqing.md +++ /dev/null @@ -1,59 +0,0 @@ -# Lin Qing - Project Portfolio Page - -## Overview -### Project: Project Tracker -Project Tracker is a desktop app for managing and tracking projects, optimized for use via a Command Line Interface (CLI). - -### Summary of Contributions - -Given below are my contributions to the - -- Add Find Command: Added the ability to find the word in the project and allows the user to easily find the specific project[#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) -- Add Complete command: Added the ability to mark the project is completed and store in project.txt[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Add project-in-charge: add the project information [#3](https://github.com/AY2021S1-TIC4001-1/tp/pull/3/commits/6210d0e4b0630f758309959d467163e6ac2440f6) -- Add client: add the project information[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) -- Add email address: add the project information [#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c) -- Add status of the project: add the status to show in the project[#56](https://github.com/AY2021S1-TIC4001-1/tp/pull/56) -- Add J-unit test: CompleteTest [#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) - -### Code contributed: -[RepoSense link](https://nus-tic4001-ay2021s1.github.io/tp-dashboard/#breakdown=true&search=QING&sort=groupTitle&sortWithin=title&since=2020-08-14&timeframe=commit&mergegroup=&groupSelect=groupByAuthors&checkedFileTypes=docs~functional-code~test-code~other&tabOpen=true&tabType=authorship&tabAuthor=linqing42&tabRepo=AY2021S1-TIC4001-1%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code) -### Project management -- Managed releases ```v1.0``` - ```v3.0``` (3 releases) on Github -### Enhancements to existing features: - -- Update the project feature [#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Storage feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Create feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update Parser[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Add feature[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the Tracker -- Update the Expected.TXT (text-ui-test)[#84](https://github.com/AY2021S1-TIC4001-1/tp/pull/84) -- Update the UI feature such as printHelp(),displayProject()[#83](https://github.com/AY2021S1-TIC4001-1/tp/pull/83/commits/0d4ea0cb5b99b5929ef1fcca822db6d94764817f) -- Update the StorageTest, projectsListTest, Ui Test[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#85](https://github.com/AY2021S1-TIC4001-1/tp/pull/85) - -### Documentation: -#### User Guide: -- Create documents and add website link: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) -- Added following features in the documentation: `help`, `create`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing documentation of features: `create`, `help`, `delete`, `list`, `find`, `exit`, `storage`, `complete`: [#7](https://github.com/AY2021S1-TIC4001-1/tp/pull/7/commits/9ba7a90287c5e5a49ec66430d456a901fc9f34a2),[#9](https://github.com/AY2021S1-TIC4001-1/tp/pull/9),[#54](https://github.com/AY2021S1-TIC4001-1/tp/pull/54/commits/919bdb4cef27a68227358fe2247501a684cc1e7c),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64),[#70](https://github.com/AY2021S1-TIC4001-1/tp/pull/70),[#75](https://github.com/AY2021S1-TIC4001-1/tp/pull/75) -#### Developer Guide: -- Added all implementation details: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Create & Draw a Sequence Diagram in Storage Command(getLines(stringe fileName) methods)[#91](https://github.com/AY2021S1-TIC4001-1/tp/pull/91),[#92](https://github.com/AY2021S1-TIC4001-1/tp/pull/92) -- Create & Draw UML class diagrams in Version 1 (Parser,Storage, Ui,Tracker, Command,Help, Add, Invalid, List,Create, Delete, Find, Exit, Project, ProjectList, NewProject, Exception, TrackerException and Edit Diagram) using Cacoo website, but expiry in 14 days, so change to Draw io and manually copy one by one, the UML class diagram Version 1 into the draw io table[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits), [#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing UML diagram and create Version 2 using draw io. (Parser,Storage,Ui,Tracker,Command,Help, Add, Invalid,List,Create,Delete, Find, Exit,Project, ProjectList, NewProject,Exception, TrackerException and Edit Diagram) and add a new class diagram in Version 2 which is Complete Diagram:[#58](https://github.com/AY2021S1-TIC4001-1/tp/pull/58/commits),[#69](https://github.com/AY2021S1-TIC4001-1/tp/pull/69),[#74](https://github.com/AY2021S1-TIC4001-1/tp/pull/74),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Did cosmetic tweaks to existing documentation[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) - -#### Read.me -- Put Product introduction and useful links for UG and DG[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495) - -### Contributions to team-based tasks : - -- Maintaining the issue tracker such as create issue tracker in version 2 and close the issue tracker in version 1, and put a remark on it. -- Create and include all Developer document: `Design&implementation`, `Product scope`, `target user profile`, `value proposition`, `users stories in version 1` and `version 2`,`non-functional requirement` and `glossary`:[#35](https://github.com/AY2021S1-TIC4001-1/tp/pull/35/commits/e160d66ace079036465a4ec7aaab583cfbbec4ee),[#37](https://github.com/AY2021S1-TIC4001-1/tp/pull/37/commits),[#38](https://github.com/AY2021S1-TIC4001-1/tp/pull/38/commits/d4cbf4bb5cd9b3f2e484ad2e05c69973739791ec),[#39](https://github.com/AY2021S1-TIC4001-1/tp/pull/39/commits),[#87](https://github.com/AY2021S1-TIC4001-1/tp/pull/87) -- Create and include all User Guide documents: `product introduction`, `quick start`, `FAQ`, `Command summary`: [#5](https://github.com/AY2021S1-TIC4001-1/tp/pull/5/commits/6965a02f9bc47ce6dc5859a54f6af6d62667e23e),[#4](https://github.com/AY2021S1-TIC4001-1/tp/pull/4/commits/d5e6bc4aa5658592ee91ee04dcd30e16f3a4c495),[#64](https://github.com/AY2021S1-TIC4001-1/tp/pull/64) -- Create draw io and invite my teammembers - -### Community: -- PRs reviewed (with non-trivial review comments):[#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12),[#77](https://github.com/AY2021S1-TIC4001-1/tp/issues/77),[#42](https://github.com/AY2021S1-TIC4001-1/tp/issues/42) -- Reported bugs: [#12](https://github.com/AY2021S1-TIC4001-1/tp/pull/12) From ea750d996a34ccf1455ea7e9a5088d11d4a6524e Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 18 Jan 2021 22:54:01 +0800 Subject: [PATCH 91/94] add a gradle --- docs/README.md | 8 ++++---- src/main/java/Dukes/Tasks/Task.java | 2 +- src/main/java/Dukes/command/FindCommand.java | 2 +- src/main/java/Dukes/command/ListCommand.java | 2 +- src/main/java/Dukes/parser/Parser.java | 12 ++++++------ src/test/Dukes/{DukeTest.java => DukesTest.java} | 0 src/test/Dukes/{ParserTest.java => ParsersTest.java} | 0 7 files changed, 13 insertions(+), 13 deletions(-) rename src/test/Dukes/{DukeTest.java => DukesTest.java} (100%) rename src/test/Dukes/{ParserTest.java => ParsersTest.java} (100%) diff --git a/docs/README.md b/docs/README.md index 244fa21b..8558f9b6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,7 +50,7 @@ Adding a deadline task helps to know the deadline for the specific task in the t
>The keyword 'deadline' with description can be **upper and lowercase letters**.
>The outcome will not include the keyword with date and time format: dd MMM yyyy, hh:mm a -
>If you key in the keyword without description. There will be an error message:"☹ OOPS!!! The description of a deadline cannot be empty." +
>If you key in the keyword without description. There will be an error message:"OOPS!!! The description of a deadline cannot be empty."
>If you missing the date and time or /by, there will be an reminder message:"Please specify the deadline date and time." **Format**: deadline Description /by dd/mm/yyyy HHmm @@ -104,7 +104,7 @@ Marking a specific task to remind the user that he has finished the task. **Expected outcome**:
Nice! I've marked this task as done: -
[T][✓] READ BOOK +
[T][Done] READ BOOK ### Feature 5 Deleting a task: delete @@ -137,7 +137,7 @@ It shows a list of all task in the task list with a number. it helps to summariz ### `list` - Listing all tasks with number.
>The keyword 'list' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list -
>If you key in the keyword with empty task.There will be an error message:"☹ OOPS!!! There are no tasks in your list." +
>If you key in the keyword with empty task.There will be an error message:"OOPS!!! There are no tasks in your list." **Format**: list @@ -159,7 +159,7 @@ It helps to search a task that contain any of the given description_keyword, and
>The keyword 'find' can be **upper and lowercase letters** and its outcome will be show a list of task in the task list when the task is match the specific description keywords.
>The order of the description_keyword does not matter.
>If you key in the specific description keyword that does not match the task in your list.There will be an error message:"☹ OOPS!!! There is no matching tasks in your list." -
>If you only key in the **keyword**, there will be an error message:"☹ OOPS!!! The description of a find cannot be empty." +
>If you only key in the **keyword**, there will be an error message:"OOPS!!! The description of a find cannot be empty." **Format**: find description_keyword[more_keyword] diff --git a/src/main/java/Dukes/Tasks/Task.java b/src/main/java/Dukes/Tasks/Task.java index 327dcf38..48ab0555 100644 --- a/src/main/java/Dukes/Tasks/Task.java +++ b/src/main/java/Dukes/Tasks/Task.java @@ -21,7 +21,7 @@ public Task(String description) { * @return Icon to indicate status of the task. */ public String getStatusIcon() { - return (isDone ? "✓" : "X"); + return (isDone ? "Done" : "X"); } public String getFileStatusIcon() { return (isDone ? "1" : "0"); diff --git a/src/main/java/Dukes/command/FindCommand.java b/src/main/java/Dukes/command/FindCommand.java index 9786a077..0851ec4a 100644 --- a/src/main/java/Dukes/command/FindCommand.java +++ b/src/main/java/Dukes/command/FindCommand.java @@ -36,7 +36,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) throws DukeException } } if (count == 0) { - throw new DukeException("☹ OOPS!!! There is no matching task in the list"); + throw new DukeException("OOPS!!! There is no matching task in the list"); } else { System.out.println("Here are the matching tasks in your list:"); for (int i = 0; i < filteredTasks.list.size(); i++) { diff --git a/src/main/java/Dukes/command/ListCommand.java b/src/main/java/Dukes/command/ListCommand.java index 5199d0e2..db33433f 100644 --- a/src/main/java/Dukes/command/ListCommand.java +++ b/src/main/java/Dukes/command/ListCommand.java @@ -25,7 +25,7 @@ public void execute(TaskList tasks, Ui ui, Storage storage) { try { int count =tasks.list.size(); if(count ==0) { - System.out.println("☹ OOPS!!! There are no tasks in your list."); + System.out.println("OOPS!!! There are no tasks in your list."); }else{ System.out.println(" Here are the tasks in your list:"); for (int i = 0; i < tasks.list.size(); i++) { diff --git a/src/main/java/Dukes/parser/Parser.java b/src/main/java/Dukes/parser/Parser.java index 0a13ec45..8eb6bcf6 100644 --- a/src/main/java/Dukes/parser/Parser.java +++ b/src/main/java/Dukes/parser/Parser.java @@ -37,7 +37,7 @@ public static Command parse(String input) throws DukeException { case "todo": if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a todo cannot be empty."); + throw new DukeException("OOPS!!! The description of a todo cannot be empty."); } taskWord = new ToDo(input.substring(5)); c = new AddCommand(taskWord); @@ -45,7 +45,7 @@ public static Command parse(String input) throws DukeException { case "delete": if (input.isEmpty() || input.length() < 7) { - throw new DukeException("☹ OOPS!!! There is no specific task to delete.\n"); + throw new DukeException("OOPS!!! There is no specific task to delete.\n"); } int toDelete = Ui.indexDetails(input); c = new DeleteCommand(toDelete); @@ -61,7 +61,7 @@ public static Command parse(String input) throws DukeException { case "deadline": if (input.length() < 10) { - throw new DukeException("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + throw new DukeException("OOPS!!! The description of a deadline cannot be empty.\n"); } String[] splitDetail = input.split("/by"); if (splitDetail.length < 2) { @@ -80,7 +80,7 @@ public static Command parse(String input) throws DukeException { case "event": if (input.length() < 7) { - throw new DukeException("☹ OOPS!!! The description of a event cannot be empty.\n"); + throw new DukeException("OOPS!!! The description of a event cannot be empty.\n"); } String[] splitEvent = input.split("/at"); if (splitEvent.length < 2) { @@ -98,7 +98,7 @@ public static Command parse(String input) throws DukeException { break; case "find": if (input.length() < 6) { - throw new DukeException("☹ OOPS!!! The description of a find cannot be empty.\n"); + throw new DukeException("OOPS!!! The description of a find cannot be empty.\n"); } try { keyword = input.substring(5).toLowerCase(); @@ -114,7 +114,7 @@ public static Command parse(String input) throws DukeException { break; default: - throw new DukeException("☹ OOPS!!! I'm sorry, but I don't know what that means :-("); + throw new DukeException("OOPS!!! I'm sorry, but I don't know what that means :-("); } return c; } diff --git a/src/test/Dukes/DukeTest.java b/src/test/Dukes/DukesTest.java similarity index 100% rename from src/test/Dukes/DukeTest.java rename to src/test/Dukes/DukesTest.java diff --git a/src/test/Dukes/ParserTest.java b/src/test/Dukes/ParsersTest.java similarity index 100% rename from src/test/Dukes/ParserTest.java rename to src/test/Dukes/ParsersTest.java From a7a654b5b28b0af9794c8d5aa4bcfc082ac707e7 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 18 Jan 2021 23:46:38 +0800 Subject: [PATCH 92/94] add-gradle-support --- build.gradle | 62 ++++++ config/checkstyle/checkstyle.xml | 252 +++++++++++++++++++++++ config/checkstyle/suppressions.xml | 10 + docs/README.md | 4 +- gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 55190 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 183 ++++++++++++++++ gradlew.bat | 103 +++++++++ settings.gradle | 2 + src/test/Dukes/ParsersTest.java | 1 - 10 files changed, 620 insertions(+), 3 deletions(-) create mode 100644 build.gradle create mode 100644 config/checkstyle/checkstyle.xml create mode 100644 config/checkstyle/suppressions.xml create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..ed3ffc95 --- /dev/null +++ b/build.gradle @@ -0,0 +1,62 @@ +plugins { + id 'java' + id 'application' + id 'checkstyle' + id 'com.github.johnrengelman.shadow' version '5.1.0' +} + +repositories { + mavenCentral() + jcenter() +} + +dependencies { + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.5.0' + testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.5.0' + // https://mvnrepository.com/artifact/com.sun.mail/javax.mail + testCompile 'junit:junit:4.12' + compile 'junit:junit:4.12' + compile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2' + +} + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + showExceptions true + exceptionFormat "full" + showCauses true + showStackTraces true + showStandardStreams = false + } +} + +jar{ + manifest { + attributes( + 'Main-Class': 'Dukes.Duke' + ) + } +} + +run { + enableAssertions = true +} + +application { + mainClassName = "Dukes.Duke" +} + +shadowJar { + archiveBaseName = "Duke" + archiveClassifier = null +} + +checkstyle { + toolVersion = '8.23' +} + +run{ + standardInput = System.in +} diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 00000000..7e1ce222 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml new file mode 100644 index 00000000..135ea49e --- /dev/null +++ b/config/checkstyle/suppressions.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 8558f9b6..d55632d4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -203,7 +203,7 @@ It helps to save the tasks in the hard disk automatically after exiting the prog **Example of usage**:
step 1. todo read book
step 2. deadline return book /by 12/11/2019 1800 -
step 3. event join club /at 11/2/2020 1300 +
step 3. event join club /at 11/2/2020 1300
step 4. done 1
step 5. bye @@ -222,7 +222,7 @@ It helps to handle error message that will guid the user.
read book **Expected outcome**: -
☹ OOPS!!! I'm sorry, but I don't know what that means :-( +
OOPS!!! I'm sorry, but I don't know what that means :-( ## Command Summary diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..87b738cbd051603d91cc39de6cb000dd98fe6b02 GIT binary patch literal 55190 zcmafaW0WS*vSoFbZQHhO+s0S6%`V%vZQJa!ZQHKus_B{g-pt%P_q|ywBQt-*Stldc z$+IJ3?^KWm27v+sf`9-50uuadKtMnL*BJ;1^6ynvR7H?hQcjE>7)art9Bu0Pcm@7C z@c%WG|JzYkP)<@zR9S^iR_sA`azaL$mTnGKnwDyMa;8yL_0^>Ba^)phg0L5rOPTbm7g*YIRLg-2^{qe^`rb!2KqS zk~5wEJtTdD?)3+}=eby3x6%i)sb+m??NHC^u=tcG8p$TzB<;FL(WrZGV&cDQb?O0GMe6PBV=V z?tTO*5_HTW$xea!nkc~Cnx#cL_rrUGWPRa6l+A{aiMY=<0@8y5OC#UcGeE#I>nWh}`#M#kIn-$A;q@u-p71b#hcSItS!IPw?>8 zvzb|?@Ahb22L(O4#2Sre&l9H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lFD-CcaiRtRdGn|K`Lq5L-rx7`vYYGH7I=eLfHRozPiUtSe~Tt;IN2^gCXmf2#D~g2@9bhzK}3nphhG%d?V7+Zq{I2?Gt*!NSn_r~dd$ zqkUOg{U=MI?Ehx@`(X%rQB?LP=CjJ*V!rec{#0W2WshH$X#9zep!K)tzZoge*LYd5 z@g?-j5_mtMp>_WW`p*UNUZTFN{_+#m*bJzt{hvAdkF{W40{#L3w6gzPztnsA_4?&0 z(+>pv!zB16rR-(nm(^c>Z(its{ny677vT8sF564^mlZvJ!h65}OW%Hn|2OXbOQM%b z{6C54Z2v;^hyMQ;UH+HwFD2!F!VlQ}6Z{L0_9g5~CH0@Mqz?ZC`^QkhOU#$Lx<4`B zyZsa9uPF!rZDo8ZVfzzR#raQ>5|)k~_Ef*wDqG^76o)j!C4 zykvT*o$!-MBko@?{b~*Zf2*YMlImrK`cEp|#D7f%Twm<|C|dWD \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java seedu.tracker.command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java seedu.tracker.command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..f2ff81e3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,103 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' seedu.tracker.command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get seedu.tracker.command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the seedu.tracker.command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the seedu.tracker.command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..f67afec9 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +rootProject.name = 'Duke' + diff --git a/src/test/Dukes/ParsersTest.java b/src/test/Dukes/ParsersTest.java index af2a5138..9d830143 100644 --- a/src/test/Dukes/ParsersTest.java +++ b/src/test/Dukes/ParsersTest.java @@ -1,7 +1,6 @@ package Dukes; -import Dukes.command.*; import Dukes.parser.Parser; import org.junit.jupiter.api.Test; From 43cd499615195f51e7afa97bcfce26a41cb098b4 Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 18 Jan 2021 23:48:58 +0800 Subject: [PATCH 93/94] add-gradle-support --- src/main/java/Dukes/Duke.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/Dukes/Duke.java b/src/main/java/Dukes/Duke.java index e23401f9..cc9ff9c0 100644 --- a/src/main/java/Dukes/Duke.java +++ b/src/main/java/Dukes/Duke.java @@ -14,7 +14,7 @@ * * @author LIN QING * @version 1.0 - * @since 14/9/2020 + * @since 18/1/2021 */ public class Duke { private final Storage storage; From 1482f52e3ca45dce04528995f257f0acf4cf47ff Mon Sep 17 00:00:00 2001 From: linqing42 Date: Mon, 18 Jan 2021 23:57:35 +0800 Subject: [PATCH 94/94] add-gradle-support --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index ed3ffc95..da661670 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,6 @@ dependencies { // https://mvnrepository.com/artifact/com.sun.mail/javax.mail testCompile 'junit:junit:4.12' compile 'junit:junit:4.12' - compile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2' }