From 556af3f47a96b32898ab4cdbd65b16486a4871e8 Mon Sep 17 00:00:00 2001 From: damithc Date: Mon, 25 May 2020 00:58:18 +0800 Subject: [PATCH 01/65] Add Gradle support --- build.gradle | 41 +++++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 58695 bytes gradle/wrapper/gradle-wrapper.properties | 5 + gradlew | 183 +++++++++++++++++++++++ gradlew.bat | 103 +++++++++++++ text-ui-test/runtest.sh | 0 6 files changed, 332 insertions(+) create mode 100644 build.gradle create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat mode change 100644 => 100755 text-ui-test/runtest.sh diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..885198fcfa --- /dev/null +++ b/build.gradle @@ -0,0 +1,41 @@ +plugins { + id 'java' + id 'application' + id 'com.github.johnrengelman.shadow' version '5.1.0' +} + +repositories { + mavenCentral() +} + +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' +} + +test { + useJUnitPlatform() + + testLogging { + events "passed", "skipped", "failed" + + showExceptions true + exceptionFormat "full" + showCauses true + showStackTraces true + showStandardStreams = false + } +} + +application { + mainClassName = "seedu.duke.Duke" +} + +shadowJar { + archiveBaseName = "duke" + archiveClassifier = null +} + +run{ + standardInput = System.in +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..f3d88b1c2faf2fc91d853cd5d4242b5547257070 GIT binary patch literal 58695 zcma&OV~}Oh(k5J8>Mq;vvTfV8ZQE5{wr$(iDciPf+tV}m-if*I+;_h3N1nY;M6TF7 zBc7A_WUgl&IY|&uNFbnJzkq;%`2QLZ5b*!{1OkHidzBVe;-?mu5upVElKVGD>pC88 zzP}E3wRHBgaO?2nzdZ5pL;m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aLmL{QM};9dke>ujP^j@z-N;fNlKb|edn>)YaafDaJ>GWKP$ z5}l&#$QFhN!CMT;WH&z-5E)kvM|36lV!^#3z{@2FF>HsgUO4PMqO#U$X%+U>K!xJ@ zBFs|+woG_9HZQs_Tw*vnCPGhlXG@>y|6pJT$I67!aP&b0o$AF2JwFy9OoapQAk>k7 z**+$_5L;5fKof<;NBX%_;vP@eyD=Z0(QW)5AF7 zp|=tk3p?5)*e~Inuydz-U?%Kuj4%zToS5I|lolPT!B)ZuRVkVa>f*-2aPeV3R79xh zB)3A$>X~szg#}>uNkpLPG#3IKyeMHM*pUuV5=-Jji7S6PSQ9oCLo{oXxzOZfF$PP) zrYwlmSQ-~n94uO3CD{K0QTmj@g%Yzn7_xQ4fTduU0Yqvln`e_`CdXH5iQ5qRr1 zBC;}%YZ2!4I>*=sR)O~jBPx6sxmIEBnq)s-fHz_y0z8-gPl2Us4BiBXNR5CIF!YR@ zb9B305SilU*@4|+ x6JBtc8JSt5M0pkooaq!^FqtuD_KdXXTo>Mw54>`rP&>h&58!3a6l6r9{sG7g--!SK literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..b7c8c5dbf5 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000000..2fe81a7d95 --- /dev/null +++ b/gradlew @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + 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 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 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 0000000000..62bd9b9cce --- /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' 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 command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the 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 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/text-ui-test/runtest.sh b/text-ui-test/runtest.sh old mode 100644 new mode 100755 From 379a115467322c20113d427f68328871100b2c88 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 20:57:42 +0800 Subject: [PATCH 02/65] Add skeletal version of Duke --- src/main/java/Duke.java | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5d313334cc..4a1ffda09a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,10 +1,37 @@ +import java.util.Scanner; + public class Duke { + private static final String indentation = " "; + private static final String horizontalLine = indentation + "____________________________________________________________"; + public static void main(String[] args) { - String logo = " ____ _ \n" - + "| _ \\ _ _| | _____ \n" - + "| | | | | | | |/ / _ \\\n" - + "| |_| | |_| | < __/\n" - + "|____/ \\__,_|_|\\_\\___|\n"; - System.out.println("Hello from\n" + logo); + System.out.println(horizontalLine); + String logo = indentation + "____ _ \n" + + indentation + "| _ \\ _ _| | _____ \n" + + indentation + "| | | | | | | |/ / _ \\\n" + + indentation + "| |_| | |_| | < __/\n" + + indentation + "|____/ \\__,_|_|\\_\\___|\n"; + System.out.println(indentation + "Hello I'm\n" + logo); + System.out.println(indentation + "What can I do for you?"); + System.out.println(horizontalLine); + + Scanner scanner = new Scanner(System.in); + + inputLoop: + while (true) { + String input = scanner.nextLine(); + + System.out.println(horizontalLine); + + switch (input) { + case "bye": + System.out.println(indentation + "Bye, hope to see you soon!"); + break inputLoop; + default: + System.out.println(indentation + input); + } + + System.out.println(horizontalLine); + } } } From da2d0ea3be20e39b59fe21fd9e8aa1c636865e10 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 21:26:59 +0800 Subject: [PATCH 03/65] Duke: add tasks --- src/main/java/Duke.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 4a1ffda09a..eaea1bd34f 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -17,6 +17,9 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); + String[] tasks = new String[100]; + int index = 0; + inputLoop: while (true) { String input = scanner.nextLine(); @@ -28,7 +31,8 @@ public static void main(String[] args) { System.out.println(indentation + "Bye, hope to see you soon!"); break inputLoop; default: - System.out.println(indentation + input); + tasks[index++] = input; + System.out.println(indentation + "added: " + input); } System.out.println(horizontalLine); From c019c1a16238073b93d7d5499fd53fb4327a99d7 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 21:28:17 +0800 Subject: [PATCH 04/65] Duke: list tasks --- src/main/java/Duke.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index eaea1bd34f..c3cc751082 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -30,6 +30,11 @@ public static void main(String[] args) { case "bye": System.out.println(indentation + "Bye, hope to see you soon!"); break inputLoop; + case "list": + for (int i = 0; i < index; i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); + } + break; default: tasks[index++] = input; System.out.println(indentation + "added: " + input); From 5b83795936aa13f76884773d2e8efc88d3df68f0 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 21:39:42 +0800 Subject: [PATCH 05/65] Add Task class --- src/main/java/Duke.java | 4 ++-- src/main/java/Task.java | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 src/main/java/Task.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index c3cc751082..f9248e02bc 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -17,7 +17,7 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); - String[] tasks = new String[100]; + Task[] tasks = new Task[100]; int index = 0; inputLoop: @@ -36,7 +36,7 @@ public static void main(String[] args) { } break; default: - tasks[index++] = input; + tasks[index++] = new Task(input); System.out.println(indentation + "added: " + input); } diff --git a/src/main/java/Task.java b/src/main/java/Task.java new file mode 100644 index 0000000000..aaa697ad78 --- /dev/null +++ b/src/main/java/Task.java @@ -0,0 +1,38 @@ +/** + * Task is a representation of a task in Duke. + */ +public class Task { + /** Description of the task. */ + private final String description; + /** Whether the task is done. */ + private boolean isDone; + + /** + * Constructor for a Task, with a description. + * Task is set as "not done" when created. + * + * @param description Description of a task. + */ + public Task(String description) { + this.description = description; + this.isDone = false; + } + + /** + * Toggles whether a task is done. + */ + public void toggleDone() { + this.isDone = !this.isDone; + } + + /** + * Gets the string representation of a task. + * + * @return String representation of a task. + */ + @Override + public String toString() { + String doneIcon = this.isDone ? "X" : " " ; + return String.format("[%s] %s", doneIcon, this.description); + } +} From 29fbd4e0dc4b98bc2d6e67c58cf93bccfab75f45 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 21:44:55 +0800 Subject: [PATCH 06/65] Duke class: change switch-case to conditional --- src/main/java/Duke.java | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index f9248e02bc..0dc0211427 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -20,24 +20,21 @@ public static void main(String[] args) { Task[] tasks = new Task[100]; int index = 0; - inputLoop: while (true) { String input = scanner.nextLine(); System.out.println(horizontalLine); - switch (input) { - case "bye": - System.out.println(indentation + "Bye, hope to see you soon!"); - break inputLoop; - case "list": - for (int i = 0; i < index; i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); - } - break; - default: - tasks[index++] = new Task(input); - System.out.println(indentation + "added: " + input); + if (input.equals("bye")) { + System.out.println(indentation + "Bye, hope to see you soon!"); + break; + } else if (input.equals("list")) { + for (int i = 0; i < index; i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); + } + } else { + tasks[index++] = new Task(input); + System.out.println(indentation + "added: " + input); } System.out.println(horizontalLine); From ae3b69a5660406bb69281de585a9bcefa08bafc2 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 21:50:31 +0800 Subject: [PATCH 07/65] Task class: split toggleDone into markAsDone and markAsUndone --- src/main/java/Task.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/Task.java b/src/main/java/Task.java index aaa697ad78..652f1f11c3 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -19,10 +19,17 @@ public Task(String description) { } /** - * Toggles whether a task is done. + * Marks a task as done. */ - public void toggleDone() { - this.isDone = !this.isDone; + public void markAsDone() { + this.isDone = true; + } + + /** + * Marks a task as undone. + */ + public void markAsUndone() { + this.isDone = false; } /** From 26be28f85389026ef426ddd0af598cbac870f42c Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 12 Aug 2022 22:00:12 +0800 Subject: [PATCH 08/65] Duke class: mark tasks as done and not done --- src/main/java/Duke.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 0dc0211427..72a3aede52 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,6 +1,7 @@ import java.util.Scanner; public class Duke { + private static final String minorIndentation = " "; private static final String indentation = " "; private static final String horizontalLine = indentation + "____________________________________________________________"; @@ -32,6 +33,24 @@ public static void main(String[] args) { for (int i = 0; i < index; i++) { System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); } + } else if (input.startsWith("mark")) { + String indexInput = input.substring(5); + int i = Integer.parseInt(indexInput); + + // subtract 1 to account for 0-index data structure + Task task = tasks[i - 1]; + task.markAsDone(); + System.out.printf(indentation + "Marked task %d as done!\n", i); + System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("unmark")) { + String indexInput = input.substring(7); + int i = Integer.parseInt(indexInput); + + // subtract 1 to account for 0-index data structure + Task task = tasks[i - 1]; + task.markAsUndone(); + System.out.printf(indentation + "Marked task %d as not done!\n", i); + System.out.println(indentation + minorIndentation + task); } else { tasks[index++] = new Task(input); System.out.println(indentation + "added: " + input); From 28026eee9a66ebbebd4172f7a1db83b9ab5f0b65 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 11:18:07 +0800 Subject: [PATCH 09/65] Add Todo class Made Task class abstract --- src/main/java/Duke.java | 8 +++++--- src/main/java/Task.java | 2 +- src/main/java/Todo.java | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 src/main/java/Todo.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 72a3aede52..8de75c2d12 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -51,9 +51,11 @@ public static void main(String[] args) { task.markAsUndone(); System.out.printf(indentation + "Marked task %d as not done!\n", i); System.out.println(indentation + minorIndentation + task); - } else { - tasks[index++] = new Task(input); - System.out.println(indentation + "added: " + input); + } else if (input.startsWith("todo")) { + Task task = Todo.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this todo!"); + System.out.println(indentation + minorIndentation + task); } System.out.println(horizontalLine); diff --git a/src/main/java/Task.java b/src/main/java/Task.java index 652f1f11c3..2f73a35e3b 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -1,7 +1,7 @@ /** * Task is a representation of a task in Duke. */ -public class Task { +public abstract class Task { /** Description of the task. */ private final String description; /** Whether the task is done. */ diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java new file mode 100644 index 0000000000..2daeae5b4b --- /dev/null +++ b/src/main/java/Todo.java @@ -0,0 +1,38 @@ +/** + * Todo is a Task without any date/time attached to it. + */ +public class Todo extends Task { + /** + * Private constructor for a Todo, with a description. + * Todo is set as "not done" when created. + * + * @param description Description of a todo. + */ + private Todo(String description) { + super(description); + } + + /** + * Factory Method for a Todo, with a user input. + * Todo is set as "not done" when created. + * + * @param input User input that starts with "todo". + * + * @return Todo object with the given user input. + */ + public static Todo create(String input) { + // Obtain the description from the user input. + String description = input.substring(5); + return new Todo(description); + } + + /** + * Gets the string representation of a todo. + * + * @return String representation of a todo. + */ + @Override + public String toString() { + return "[T]" + super.toString(); + } +} From 949c716d6954769ff4b6a032a6ae2f2f0b75f25c Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 11:29:51 +0800 Subject: [PATCH 10/65] Add Deadline class --- src/main/java/Deadline.java | 47 +++++++++++++++++++++++++++++++++++++ src/main/java/Duke.java | 5 ++++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/Deadline.java diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java new file mode 100644 index 0000000000..0fb67fe84e --- /dev/null +++ b/src/main/java/Deadline.java @@ -0,0 +1,47 @@ +/** + * Deadline is a Task that needs to be done before a specific date/time. + */ +public class Deadline extends Task { + /** Deadline of the deadline. */ + private final String deadline; + + /** + * Private constructor for a deadline, with a description and deadline. + * Deadline is set as "not done" when created. + * + * @param description Description of a deadline. + * @param deadline Deadline of a deadline. + */ + private Deadline(String description, String deadline) { + super(description); + this.deadline = deadline; + } + + /** + * Factory Method for a Deadline, with a user input. + * Deadline is set as "not done" when created. + * + * @param input User input that starts with "deadline". + * + * @return Deadline object with the given user input. + */ + public static Deadline create(String input) { + // Obtain the description and date from the user input. + String descAndDate = input.substring(9); + // Split the input into description and date with the separator of "\by". + String[] split = descAndDate.split(" /by "); + String description = split[0]; + String deadline = split[1]; + return new Deadline(description, deadline); + } + + /** + * Gets the string representation of a deadline. + * + * @return String representation of a deadline. + */ + @Override + public String toString() { + return String.format("[D]%s (by: %s)", super.toString(), this.deadline); + } +} diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 8de75c2d12..395c996808 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -56,6 +56,11 @@ public static void main(String[] args) { tasks[index++] = task; System.out.println(indentation + "Added this todo!"); System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("deadline")) { + Task task = Deadline.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this deadline!"); + System.out.println(indentation + minorIndentation + task); } System.out.println(horizontalLine); From 81e39e55710a63df3e4e6c930076de3124a28849 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 11:36:43 +0800 Subject: [PATCH 11/65] Add Event class --- src/main/java/Duke.java | 5 +++++ src/main/java/Event.java | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/Event.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 395c996808..78fbf506c5 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -61,6 +61,11 @@ public static void main(String[] args) { tasks[index++] = task; System.out.println(indentation + "Added this deadline!"); System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("event")) { + Task task = Event.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this event!"); + System.out.println(indentation + minorIndentation + task); } System.out.println(horizontalLine); diff --git a/src/main/java/Event.java b/src/main/java/Event.java new file mode 100644 index 0000000000..6a36bdebc9 --- /dev/null +++ b/src/main/java/Event.java @@ -0,0 +1,47 @@ +/** + * Event is a Task that starts at a specific time and ends at a specific time. + */ +public class Event extends Task { + /** Date of the event. */ + private final String date; + + /** + * Private constructor for an event, with a description and date. + * Event is set as "not done" when created. + * + * @param description Description of an event. + * @param date Date of an event. + */ + private Event(String description, String date) { + super(description); + this.date = date; + } + + /** + * Factory Method for an Event, with a user input. + * Event is set as "not done" when created. + * + * @param input User input that starts with "event". + * + * @return Event object with the given user input. + */ + public static Event create(String input) { + // Obtain the description and date from the user input. + String descAndDate = input.substring(6); + // Split the input into description and date with the separator of "\by". + String[] split = descAndDate.split(" /at "); + String description = split[0]; + String date = split[1]; + return new Event(description, date); + } + + /** + * Gets the string representation of an event. + * + * @return String representation of an event + */ + @Override + public String toString() { + return String.format("[E]%s (at: %s)", super.toString(), this.date); + } +} From bb48f993052b3a6f31183868b6d21e972dbdfbb2 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 12:02:42 +0800 Subject: [PATCH 12/65] Duke class: show number of tasks when adding --- src/main/java/Duke.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 78fbf506c5..e19e4911aa 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -56,16 +56,19 @@ public static void main(String[] args) { tasks[index++] = task; System.out.println(indentation + "Added this todo!"); System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); } else if (input.startsWith("deadline")) { Task task = Deadline.create(input); tasks[index++] = task; System.out.println(indentation + "Added this deadline!"); System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); } else if (input.startsWith("event")) { Task task = Event.create(input); tasks[index++] = task; System.out.println(indentation + "Added this event!"); System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); } System.out.println(horizontalLine); From 699f9d64c255e84cbf1e3d5078d63a8adc61f97b Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 12:05:40 +0800 Subject: [PATCH 13/65] Add automated text UI testing --- text-ui-test/EXPECTED.TXT | 76 +++++++++++++++++++++++++++++++++++---- text-ui-test/input.txt | 12 +++++++ 2 files changed, 82 insertions(+), 6 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 657e74f6e7..59b3a64d86 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -1,7 +1,71 @@ -Hello from - ____ _ -| _ \ _ _| | _____ -| | | | | | | |/ / _ \ -| |_| | |_| | < __/ -|____/ \__,_|_|\_\___| + ____________________________________________________________ + Hello I'm + ____ _ + | _ \ _ _| | _____ + | | | | | | | |/ / _ \ + | |_| | |_| | < __/ + |____/ \__,_|_|\_\___| + What can I do for you? + ____________________________________________________________ + ____________________________________________________________ + Added this todo! + [T][ ] read book + Now you have 1 tasks. + ____________________________________________________________ + ____________________________________________________________ + Marked task 1 as done! + [T][X] read book + ____________________________________________________________ + ____________________________________________________________ + Added this deadline! + [D][ ] return book (by: June 6th) + Now you have 2 tasks. + ____________________________________________________________ + ____________________________________________________________ + Added this event! + [E][ ] project meeting (at: Aug 6th 2-4pm) + Now you have 3 tasks. + ____________________________________________________________ + ____________________________________________________________ + Added this todo! + [T][ ] join sports club + Now you have 4 tasks. + ____________________________________________________________ + ____________________________________________________________ + Marked task 4 as done! + [T][X] join sports club + ____________________________________________________________ + ____________________________________________________________ + Added this todo! + [T][ ] borrow book + Now you have 5 tasks. + ____________________________________________________________ + ____________________________________________________________ + 1: [T][X] read book + 2: [D][ ] return book (by: June 6th) + 3: [E][ ] project meeting (at: Aug 6th 2-4pm) + 4: [T][X] join sports club + 5: [T][ ] borrow book + ____________________________________________________________ + ____________________________________________________________ + Added this deadline! + [D][ ] return book 2 (by: Sunday) + Now you have 6 tasks. + ____________________________________________________________ + ____________________________________________________________ + Added this event! + [E][ ] project meeting (at: Mon 2-4pm) + Now you have 7 tasks. + ____________________________________________________________ + ____________________________________________________________ + 1: [T][X] read book + 2: [D][ ] return book (by: June 6th) + 3: [E][ ] project meeting (at: Aug 6th 2-4pm) + 4: [T][X] join sports club + 5: [T][ ] borrow book + 6: [D][ ] return book 2 (by: Sunday) + 7: [E][ ] project meeting (at: Mon 2-4pm) + ____________________________________________________________ + ____________________________________________________________ + Bye, hope to see you soon! diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index e69de29bb2..3f6a3f23b0 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -0,0 +1,12 @@ +todo read book +mark 1 +deadline return book /by June 6th +event project meeting /at Aug 6th 2-4pm +todo join sports club +mark 4 +todo borrow book +list +deadline return book 2 /by Sunday +event project meeting /at Mon 2-4pm +list +bye From 5d4bc0accb9d2d870b48348f4bc20aac04a3173d Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 12:26:08 +0800 Subject: [PATCH 14/65] Add DukeException and error handling for Todo Change "true" while loop to check for scanner input instead. --- src/main/java/Duke.java | 99 +++++++++++++++++--------------- src/main/java/DukeException.java | 5 ++ src/main/java/Todo.java | 6 +- 3 files changed, 63 insertions(+), 47 deletions(-) create mode 100644 src/main/java/DukeException.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index e19e4911aa..ca3bf73c01 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -21,57 +21,64 @@ public static void main(String[] args) { Task[] tasks = new Task[100]; int index = 0; - while (true) { - String input = scanner.nextLine(); + while (scanner.hasNext()) { + try { + String input = scanner.nextLine(); - System.out.println(horizontalLine); + System.out.println(horizontalLine); - if (input.equals("bye")) { - System.out.println(indentation + "Bye, hope to see you soon!"); - break; - } else if (input.equals("list")) { - for (int i = 0; i < index; i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); - } - } else if (input.startsWith("mark")) { - String indexInput = input.substring(5); - int i = Integer.parseInt(indexInput); + if (input.equals("bye")) { + break; + } else if (input.equals("list")) { + for (int i = 0; i < index; i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); + } + } else if (input.startsWith("mark")) { + String indexInput = input.substring(5); + int i = Integer.parseInt(indexInput); - // subtract 1 to account for 0-index data structure - Task task = tasks[i - 1]; - task.markAsDone(); - System.out.printf(indentation + "Marked task %d as done!\n", i); - System.out.println(indentation + minorIndentation + task); - } else if (input.startsWith("unmark")) { - String indexInput = input.substring(7); - int i = Integer.parseInt(indexInput); + // subtract 1 to account for 0-index data structure + Task task = tasks[i - 1]; + task.markAsDone(); + System.out.printf(indentation + "Marked task %d as done!\n", i); + System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("unmark")) { + String indexInput = input.substring(7); + int i = Integer.parseInt(indexInput); - // subtract 1 to account for 0-index data structure - Task task = tasks[i - 1]; - task.markAsUndone(); - System.out.printf(indentation + "Marked task %d as not done!\n", i); - System.out.println(indentation + minorIndentation + task); - } else if (input.startsWith("todo")) { - Task task = Todo.create(input); - tasks[index++] = task; - System.out.println(indentation + "Added this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); - } else if (input.startsWith("deadline")) { - Task task = Deadline.create(input); - tasks[index++] = task; - System.out.println(indentation + "Added this deadline!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); - } else if (input.startsWith("event")) { - Task task = Event.create(input); - tasks[index++] = task; - System.out.println(indentation + "Added this event!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); - } + // subtract 1 to account for 0-index data structure + Task task = tasks[i - 1]; + task.markAsUndone(); + System.out.printf(indentation + "Marked task %d as not done!\n", i); + System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("todo")) { + Task task = Todo.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); + } else if (input.startsWith("deadline")) { + Task task = Deadline.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this deadline!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); + } else if (input.startsWith("event")) { + Task task = Event.create(input); + tasks[index++] = task; + System.out.println(indentation + "Added this event!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", index); + } - System.out.println(horizontalLine); + System.out.println(horizontalLine); + } catch (DukeException e) { + System.out.println(indentation + e.getMessage()); + System.out.println(horizontalLine); + } } + + System.out.println(indentation + "Bye, hope to see you soon!"); + System.out.println(horizontalLine); } } diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java new file mode 100644 index 0000000000..fe8837e3a3 --- /dev/null +++ b/src/main/java/DukeException.java @@ -0,0 +1,5 @@ +public class DukeException extends Exception { + public DukeException(String message) { + super(message); + } +} diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java index 2daeae5b4b..40e1ce0367 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/Todo.java @@ -20,7 +20,11 @@ private Todo(String description) { * * @return Todo object with the given user input. */ - public static Todo create(String input) { + public static Todo create(String input) throws DukeException { + if (input.length() < 6) { + // If user typed "todo" or "todo " or any other input less than 6 characters, the description will be empty. + throw new DukeException("Description of Todo cannot be empty!"); + } // Obtain the description from the user input. String description = input.substring(5); return new Todo(description); From 565a91458545fc613bd03547237732d62141711f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 12:39:55 +0800 Subject: [PATCH 15/65] Add error handling for Deadline --- src/main/java/Deadline.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index 0fb67fe84e..26ea821174 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -25,11 +25,18 @@ private Deadline(String description, String deadline) { * * @return Deadline object with the given user input. */ - public static Deadline create(String input) { + public static Deadline create(String input) throws DukeException { + if (input.length() < 10) { + // If user typed "deadline" or "deadline " or any other input less than 10 characters, the description will be empty. + throw new DukeException("Description of Deadline cannot be empty!"); + } // Obtain the description and date from the user input. String descAndDate = input.substring(9); - // Split the input into description and date with the separator of "\by". + // Split the input into description and date with the separator of "/by". String[] split = descAndDate.split(" /by "); + if (split.length != 2) { + throw new DukeException("Wrong format for Deadline!\n Should be 'deadline /by '."); + } String description = split[0]; String deadline = split[1]; return new Deadline(description, deadline); From c4c1b12af011cf7ed5708eca3490f6b40dbbbd8f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 12:40:07 +0800 Subject: [PATCH 16/65] Add error handling for Event --- src/main/java/Event.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 6a36bdebc9..567571d8f9 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -25,11 +25,18 @@ private Event(String description, String date) { * * @return Event object with the given user input. */ - public static Event create(String input) { + public static Event create(String input) throws DukeException { + if (input.length() < 7) { + // If user typed "event" or "event " or any other input less than 7 characters, the description will be empty. + throw new DukeException("Description of Event cannot be empty!"); + } // Obtain the description and date from the user input. String descAndDate = input.substring(6); - // Split the input into description and date with the separator of "\by". + // Split the input into description and date with the separator of "/at". String[] split = descAndDate.split(" /at "); + if (split.length != 2) { + throw new DukeException("Wrong format for Event!\n Should be 'event /at '."); + } String description = split[0]; String date = split[1]; return new Event(description, date); From 0a321e2dba24304f836ad796c918529b85dacf94 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 17:00:10 +0800 Subject: [PATCH 17/65] Add error handling for unknown command --- src/main/java/Duke.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index ca3bf73c01..b5ca401da2 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -69,6 +69,8 @@ public static void main(String[] args) { System.out.println(indentation + "Added this event!"); System.out.println(indentation + minorIndentation + task); System.out.printf(indentation + "Now you have %d tasks.\n", index); + } else { + throw new DukeException("Unknown command!"); } System.out.println(horizontalLine); From 3d546713c671c2855f4370f7998b360f0961b382 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 17:00:22 +0800 Subject: [PATCH 18/65] Add tests for error handling --- text-ui-test/EXPECTED.TXT | 33 +++++++++++++++++++++++++++++++++ text-ui-test/input.txt | 10 ++++++++++ 2 files changed, 43 insertions(+) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 59b3a64d86..787edf61a9 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -68,4 +68,37 @@ 7: [E][ ] project meeting (at: Mon 2-4pm) ____________________________________________________________ ____________________________________________________________ + Description of Todo cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Description of Todo cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Description of Deadline cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Description of Deadline cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Wrong format for Deadline! + Should be 'deadline /by '. + ____________________________________________________________ + ____________________________________________________________ + Description of Event cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Description of Event cannot be empty! + ____________________________________________________________ + ____________________________________________________________ + Wrong format for Event! + Should be 'event /at '. + ____________________________________________________________ + ____________________________________________________________ + Unknown command! + ____________________________________________________________ + ____________________________________________________________ + Unknown command! + ____________________________________________________________ + ____________________________________________________________ Bye, hope to see you soon! + ____________________________________________________________ diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 3f6a3f23b0..05ca0e2f5a 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -9,4 +9,14 @@ list deadline return book 2 /by Sunday event project meeting /at Mon 2-4pm list +todo +todo +deadline +deadline +deadline x +event +event +event x +blah +? bye From 79048411662c7e7b4ed2107222ad0657cfba7a2d Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 17:14:52 +0800 Subject: [PATCH 19/65] Duke class: change task array to task arraylist --- src/main/java/Duke.java | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index b5ca401da2..5b50286dc3 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,4 @@ +import java.util.ArrayList; import java.util.Scanner; public class Duke { @@ -18,8 +19,7 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); - Task[] tasks = new Task[100]; - int index = 0; + ArrayList tasks = new ArrayList<>(); while (scanner.hasNext()) { try { @@ -30,15 +30,15 @@ public static void main(String[] args) { if (input.equals("bye")) { break; } else if (input.equals("list")) { - for (int i = 0; i < index; i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks[i]); + for (int i = 0; i < tasks.size(); i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); } } else if (input.startsWith("mark")) { String indexInput = input.substring(5); int i = Integer.parseInt(indexInput); // subtract 1 to account for 0-index data structure - Task task = tasks[i - 1]; + Task task = tasks.get(i - 1); task.markAsDone(); System.out.printf(indentation + "Marked task %d as done!\n", i); System.out.println(indentation + minorIndentation + task); @@ -47,28 +47,34 @@ public static void main(String[] args) { int i = Integer.parseInt(indexInput); // subtract 1 to account for 0-index data structure - Task task = tasks[i - 1]; + Task task = tasks.get(i - 1); task.markAsUndone(); System.out.printf(indentation + "Marked task %d as not done!\n", i); System.out.println(indentation + minorIndentation + task); } else if (input.startsWith("todo")) { Task task = Todo.create(input); - tasks[index++] = task; + tasks.add(task); + int numberOfTasks = tasks.size(); + System.out.println(indentation + "Added this todo!"); System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); } else if (input.startsWith("deadline")) { Task task = Deadline.create(input); - tasks[index++] = task; + tasks.add(task); + int numberOfTasks = tasks.size(); + System.out.println(indentation + "Added this deadline!"); System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); } else if (input.startsWith("event")) { Task task = Event.create(input); - tasks[index++] = task; + tasks.add(task); + int numberOfTasks = tasks.size(); + System.out.println(indentation + "Added this event!"); System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", index); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); } else { throw new DukeException("Unknown command!"); } From a7eb54075521cb14bc9801d147bb4a944c506e38 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 17:28:02 +0800 Subject: [PATCH 20/65] Duke class: add ability to delete tasks Add error handling and tests for deleting tasks. Improve error handling for mark and unmark operations. --- src/main/java/Duke.java | 27 +++++++++++++++++++++++++-- text-ui-test/EXPECTED.TXT | 17 +++++++++++++++++ text-ui-test/input.txt | 3 +++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5b50286dc3..8f4c582bfa 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -36,21 +36,41 @@ public static void main(String[] args) { } else if (input.startsWith("mark")) { String indexInput = input.substring(5); int i = Integer.parseInt(indexInput); - + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } // subtract 1 to account for 0-index data structure Task task = tasks.get(i - 1); task.markAsDone(); + System.out.printf(indentation + "Marked task %d as done!\n", i); System.out.println(indentation + minorIndentation + task); } else if (input.startsWith("unmark")) { String indexInput = input.substring(7); int i = Integer.parseInt(indexInput); - + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } // subtract 1 to account for 0-index data structure Task task = tasks.get(i - 1); task.markAsUndone(); + System.out.printf(indentation + "Marked task %d as not done!\n", i); System.out.println(indentation + minorIndentation + task); + } else if (input.startsWith("delete")) { + String indexInput = input.substring(7); + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } + // subtract 1 to account for 0-index data structure + Task task = tasks.get(i - 1); + tasks.remove(i - 1); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Removing this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); } else if (input.startsWith("todo")) { Task task = Todo.create(input); tasks.add(task); @@ -83,6 +103,9 @@ public static void main(String[] args) { } catch (DukeException e) { System.out.println(indentation + e.getMessage()); System.out.println(horizontalLine); + } catch (NumberFormatException e) { + System.out.println("Invalid number!"); + System.out.println(horizontalLine); } } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 787edf61a9..cf93fce78c 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -100,5 +100,22 @@ Unknown command! ____________________________________________________________ ____________________________________________________________ + Removing this todo! + [T][X] read book + Now you have 6 tasks. + ____________________________________________________________ + ____________________________________________________________ + Removing this todo! + [D][ ] return book (by: June 6th) + Now you have 5 tasks. + ____________________________________________________________ + ____________________________________________________________ + 1: [E][ ] project meeting (at: Aug 6th 2-4pm) + 2: [T][X] join sports club + 3: [T][ ] borrow book + 4: [D][ ] return book 2 (by: Sunday) + 5: [E][ ] project meeting (at: Mon 2-4pm) + ____________________________________________________________ + ____________________________________________________________ Bye, hope to see you soon! ____________________________________________________________ diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 05ca0e2f5a..5f6e45914d 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -19,4 +19,7 @@ event event x blah ? +delete 1 +delete 1 +list bye From 72d366c9e3849717bc0031207408a8872e627eb5 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 17:46:13 +0800 Subject: [PATCH 21/65] Duke class: improved user input handling --- src/main/java/Duke.java | 164 ++++++++++++++++++++++++---------------- 1 file changed, 97 insertions(+), 67 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 8f4c582bfa..5c3a9bbfcc 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -21,82 +21,111 @@ public static void main(String[] args) { ArrayList tasks = new ArrayList<>(); + scanLoop: while (scanner.hasNext()) { try { String input = scanner.nextLine(); + String[] split = input.split(" ", 2); + String command = split[0]; + System.out.println(horizontalLine); - if (input.equals("bye")) { - break; - } else if (input.equals("list")) { - for (int i = 0; i < tasks.size(); i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); + // Handle the various commands. + switch (command) { + case "bye": + // Stops the application, by breaking out of the scan loop. + break scanLoop; + case "list": + for (int i = 0; i < tasks.size(); i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); + } + break; + case "mark": { + if (split.length != 2) { + throw new DukeException("Please provide an index!"); + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + task.markAsDone(); + + System.out.printf(indentation + "Marked task %d as done!\n", i); + System.out.println(indentation + minorIndentation + task); + break; } - } else if (input.startsWith("mark")) { - String indexInput = input.substring(5); - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + case "unmark": { + if (split.length != 2) { + throw new DukeException("Please provide an index!"); + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + task.markAsUndone(); + + System.out.printf(indentation + "Marked task %d as not done!\n", i); + System.out.println(indentation + minorIndentation + task); + break; } - // subtract 1 to account for 0-index data structure - Task task = tasks.get(i - 1); - task.markAsDone(); - - System.out.printf(indentation + "Marked task %d as done!\n", i); - System.out.println(indentation + minorIndentation + task); - } else if (input.startsWith("unmark")) { - String indexInput = input.substring(7); - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + case "delete": { + if (split.length != 2) { + throw new DukeException("Please provide an index!"); + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw new DukeException("Invalid index!"); + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + tasks.remove(i - 1); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Removing this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + break; } - // subtract 1 to account for 0-index data structure - Task task = tasks.get(i - 1); - task.markAsUndone(); - - System.out.printf(indentation + "Marked task %d as not done!\n", i); - System.out.println(indentation + minorIndentation + task); - } else if (input.startsWith("delete")) { - String indexInput = input.substring(7); - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + case "todo": { + Task task = Todo.create(input); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + break; + } + case "deadline": { + Task task = Deadline.create(input); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this deadline!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + break; + } + case "event": { + Task task = Event.create(input); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this event!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + break; } - // subtract 1 to account for 0-index data structure - Task task = tasks.get(i - 1); - tasks.remove(i - 1); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Removing this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); - } else if (input.startsWith("todo")) { - Task task = Todo.create(input); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); - } else if (input.startsWith("deadline")) { - Task task = Deadline.create(input); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this deadline!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); - } else if (input.startsWith("event")) { - Task task = Event.create(input); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this event!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); - } else { - throw new DukeException("Unknown command!"); + default: + throw new DukeException("Unknown command!"); } System.out.println(horizontalLine); @@ -104,7 +133,8 @@ public static void main(String[] args) { System.out.println(indentation + e.getMessage()); System.out.println(horizontalLine); } catch (NumberFormatException e) { - System.out.println("Invalid number!"); + // Handles case where user inputs an invalid number. + System.out.println(indentation + "Invalid number!"); System.out.println(horizontalLine); } } From ca279e88ca3bec7ece7e1617fd347d2b4be112c8 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 13 Aug 2022 18:07:23 +0800 Subject: [PATCH 22/65] Improved input handling for various Todo classes Abstracted out commonly used exceptions. --- src/main/java/Deadline.java | 17 +++++++++-------- src/main/java/Duke.java | 32 ++++++++++++++++++++++---------- src/main/java/DukeException.java | 13 +++++++++++++ src/main/java/Event.java | 17 +++++++++-------- src/main/java/Todo.java | 13 ++++++------- 5 files changed, 59 insertions(+), 33 deletions(-) diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index 26ea821174..b5815e8209 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -2,6 +2,10 @@ * Deadline is a Task that needs to be done before a specific date/time. */ public class Deadline extends Task { + public final static DukeException emptyDescription = new DukeException("Description of Deadline cannot be empty!"); + public final static DukeException wrongFormat = + new DukeException("Wrong format for Deadline!\n Should be 'deadline /by '."); + /** Deadline of the deadline. */ private final String deadline; @@ -21,21 +25,18 @@ private Deadline(String description, String deadline) { * Factory Method for a Deadline, with a user input. * Deadline is set as "not done" when created. * - * @param input User input that starts with "deadline". + * @param input User input. * * @return Deadline object with the given user input. */ public static Deadline create(String input) throws DukeException { - if (input.length() < 10) { - // If user typed "deadline" or "deadline " or any other input less than 10 characters, the description will be empty. - throw new DukeException("Description of Deadline cannot be empty!"); + if (input.length() < 1) { + throw Deadline.emptyDescription; } - // Obtain the description and date from the user input. - String descAndDate = input.substring(9); // Split the input into description and date with the separator of "/by". - String[] split = descAndDate.split(" /by "); + String[] split = input.split(" /by "); if (split.length != 2) { - throw new DukeException("Wrong format for Deadline!\n Should be 'deadline /by '."); + throw wrongFormat; } String description = split[0]; String deadline = split[1]; diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5c3a9bbfcc..42611b8c64 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -43,12 +43,12 @@ public static void main(String[] args) { break; case "mark": { if (split.length != 2) { - throw new DukeException("Please provide an index!"); + throw DukeException.noIndex; } String indexInput = split[1]; int i = Integer.parseInt(indexInput); if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. Task task = tasks.get(i - 1); @@ -60,12 +60,12 @@ public static void main(String[] args) { } case "unmark": { if (split.length != 2) { - throw new DukeException("Please provide an index!"); + throw DukeException.noIndex; } String indexInput = split[1]; int i = Integer.parseInt(indexInput); if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. Task task = tasks.get(i - 1); @@ -77,12 +77,12 @@ public static void main(String[] args) { } case "delete": { if (split.length != 2) { - throw new DukeException("Please provide an index!"); + throw DukeException.noIndex; } String indexInput = split[1]; int i = Integer.parseInt(indexInput); if (i <= 0 || i > tasks.size()) { - throw new DukeException("Invalid index!"); + throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. Task task = tasks.get(i - 1); @@ -95,7 +95,11 @@ public static void main(String[] args) { break; } case "todo": { - Task task = Todo.create(input); + if (split.length != 2) { + throw Todo.emptyDescription; + } + String description = split[1]; + Task task = Todo.create(description); tasks.add(task); int numberOfTasks = tasks.size(); @@ -105,7 +109,11 @@ public static void main(String[] args) { break; } case "deadline": { - Task task = Deadline.create(input); + if (split.length != 2) { + throw Deadline.emptyDescription; + } + String descAndDate = split[1]; + Task task = Deadline.create(descAndDate); tasks.add(task); int numberOfTasks = tasks.size(); @@ -115,7 +123,11 @@ public static void main(String[] args) { break; } case "event": { - Task task = Event.create(input); + if (split.length != 2) { + throw Event.emptyDescription; + } + String descAndDate = split[1]; + Task task = Event.create(descAndDate); tasks.add(task); int numberOfTasks = tasks.size(); @@ -125,7 +137,7 @@ public static void main(String[] args) { break; } default: - throw new DukeException("Unknown command!"); + throw DukeException.unknownCommand; } System.out.println(horizontalLine); diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java index fe8837e3a3..f0b048f54c 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/DukeException.java @@ -1,4 +1,17 @@ +/** + * Exception for the Duke application. + */ public class DukeException extends Exception { + // Some commonly used exceptions. + public final static DukeException unknownCommand = new DukeException("Unknown command!"); + public final static DukeException noIndex = new DukeException("Please provide an index!"); + public final static DukeException invalidIndex = new DukeException("Invalid index!"); + + /** + * Constructor for a Duke Exception, that takes in a message. + * + * @param message Message for the Duke Exception. + */ public DukeException(String message) { super(message); } diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 567571d8f9..5eadc8052c 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -2,6 +2,10 @@ * Event is a Task that starts at a specific time and ends at a specific time. */ public class Event extends Task { + public final static DukeException emptyDescription = new DukeException("Description of Event cannot be empty!"); + public final static DukeException wrongFormat = + new DukeException("Wrong format for Event!\n Should be 'event /at '."); + /** Date of the event. */ private final String date; @@ -21,21 +25,18 @@ private Event(String description, String date) { * Factory Method for an Event, with a user input. * Event is set as "not done" when created. * - * @param input User input that starts with "event". + * @param input User input. * * @return Event object with the given user input. */ public static Event create(String input) throws DukeException { - if (input.length() < 7) { - // If user typed "event" or "event " or any other input less than 7 characters, the description will be empty. - throw new DukeException("Description of Event cannot be empty!"); + if (input.length() < 1) { + throw Event.emptyDescription; } - // Obtain the description and date from the user input. - String descAndDate = input.substring(6); // Split the input into description and date with the separator of "/at". - String[] split = descAndDate.split(" /at "); + String[] split = input.split(" /at "); if (split.length != 2) { - throw new DukeException("Wrong format for Event!\n Should be 'event /at '."); + throw Event.wrongFormat; } String description = split[0]; String date = split[1]; diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java index 40e1ce0367..35570cfb68 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/Todo.java @@ -2,6 +2,8 @@ * Todo is a Task without any date/time attached to it. */ public class Todo extends Task { + public final static DukeException emptyDescription = new DukeException("Description of Todo cannot be empty!"); + /** * Private constructor for a Todo, with a description. * Todo is set as "not done" when created. @@ -16,17 +18,14 @@ private Todo(String description) { * Factory Method for a Todo, with a user input. * Todo is set as "not done" when created. * - * @param input User input that starts with "todo". + * @param description Description of Todo. * * @return Todo object with the given user input. */ - public static Todo create(String input) throws DukeException { - if (input.length() < 6) { - // If user typed "todo" or "todo " or any other input less than 6 characters, the description will be empty. - throw new DukeException("Description of Todo cannot be empty!"); + public static Todo create(String description) throws DukeException { + if (description.length() < 1) { + throw Todo.emptyDescription; } - // Obtain the description from the user input. - String description = input.substring(5); return new Todo(description); } From d7f3cae7ef54baaeb8269a425366083f8ecdbfcd Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Wed, 17 Aug 2022 20:58:03 +0800 Subject: [PATCH 23/65] Duke: Abstracted out operations into individual methods --- src/main/java/Duke.java | 188 +++++++++++++++++++++++----------------- 1 file changed, 108 insertions(+), 80 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 42611b8c64..0ef5170588 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -6,6 +6,107 @@ public class Duke { private static final String indentation = " "; private static final String horizontalLine = indentation + "____________________________________________________________"; + private static void list(ArrayList tasks) { + for (int i = 0; i < tasks.size(); i++) { + System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); + } + } + + private static void mark(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw DukeException.noIndex; + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + task.markAsDone(); + + System.out.printf(indentation + "Marked task %d as done!\n", i); + System.out.println(indentation + minorIndentation + task); + } + + private static void unmark(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw DukeException.noIndex; + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + task.markAsUndone(); + + System.out.printf(indentation + "Marked task %d as not done!\n", i); + System.out.println(indentation + minorIndentation + task); + } + + private static void delete(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw DukeException.noIndex; + } + String indexInput = split[1]; + int i = Integer.parseInt(indexInput); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = tasks.get(i - 1); + tasks.remove(i - 1); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Removing this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + } + + private static void todo(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw Todo.emptyDescription; + } + String description = split[1]; + Task task = Todo.create(description); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this todo!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + } + + private static void deadline(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw Deadline.emptyDescription; + } + String descAndDate = split[1]; + Task task = Deadline.create(descAndDate); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this deadline!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + } + + private static void event(ArrayList tasks, String[] split) throws DukeException { + if (split.length != 2) { + throw Event.emptyDescription; + } + String descAndDate = split[1]; + Task task = Event.create(descAndDate); + tasks.add(task); + int numberOfTasks = tasks.size(); + + System.out.println(indentation + "Added this event!"); + System.out.println(indentation + minorIndentation + task); + System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + } + public static void main(String[] args) { System.out.println(horizontalLine); String logo = indentation + "____ _ \n" @@ -37,103 +138,30 @@ public static void main(String[] args) { // Stops the application, by breaking out of the scan loop. break scanLoop; case "list": - for (int i = 0; i < tasks.size(); i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); - } + Duke.list(tasks); break; case "mark": { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - task.markAsDone(); - - System.out.printf(indentation + "Marked task %d as done!\n", i); - System.out.println(indentation + minorIndentation + task); + Duke.mark(tasks, split); break; } case "unmark": { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - task.markAsUndone(); - - System.out.printf(indentation + "Marked task %d as not done!\n", i); - System.out.println(indentation + minorIndentation + task); + Duke.unmark(tasks, split); break; } case "delete": { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - tasks.remove(i - 1); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Removing this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + Duke.delete(tasks, split); break; } case "todo": { - if (split.length != 2) { - throw Todo.emptyDescription; - } - String description = split[1]; - Task task = Todo.create(description); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + Duke.todo(tasks, split); break; } case "deadline": { - if (split.length != 2) { - throw Deadline.emptyDescription; - } - String descAndDate = split[1]; - Task task = Deadline.create(descAndDate); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this deadline!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + Duke.deadline(tasks, split); break; } case "event": { - if (split.length != 2) { - throw Event.emptyDescription; - } - String descAndDate = split[1]; - Task task = Event.create(descAndDate); - tasks.add(task); - int numberOfTasks = tasks.size(); - - System.out.println(indentation + "Added this event!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + Duke.event(tasks, split); break; } default: From 41c9a8a57d0e84566c9efb2515dd0bea3f0e6a8d Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Wed, 17 Aug 2022 21:42:06 +0800 Subject: [PATCH 24/65] Load tasks from file --- .gitignore | 1 + src/main/java/Deadline.java | 17 ++++++++ src/main/java/Duke.java | 71 +++++++++++++++++++++++++++++++- src/main/java/DukeException.java | 1 + src/main/java/Event.java | 17 ++++++++ src/main/java/Todo.java | 16 +++++++ 6 files changed, 122 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f69985ef1f..757d2d235f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ bin/ /text-ui-test/ACTUAL.txt text-ui-test/EXPECTED-UNIX.TXT +/data diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index b5815e8209..c1637ea87e 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -43,6 +43,23 @@ public static Deadline create(String input) throws DukeException { return new Deadline(description, deadline); } + /** + * Factory method for a Deadline, with done and description and date. + * + * @param done Whether the Deadline is done. + * @param description Description of Deadline. + * @param date Date of Deadline. + * + * @return Deadline object with the given parameters. + */ + public static Deadline create(String done, String description, String date) { + Deadline deadline = new Deadline(description, date); + if (done.equals("1")) { + deadline.markAsDone(); + } + return deadline; + } + /** * Gets the string representation of a deadline. * diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 0ef5170588..d93110927a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,3 +1,8 @@ +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Scanner; @@ -6,6 +11,60 @@ public class Duke { private static final String indentation = " "; private static final String horizontalLine = indentation + "____________________________________________________________"; + /** + * Load tasks from file. + * + * @return tasks The tasks loaded from the file. + */ + private static ArrayList loadTasks() throws DukeException { + Path directoryPath = Paths.get("data"); + Path filePath = Paths.get("data/tasks"); + File directory = new File(directoryPath.toUri()); + // Create directory if it does not exist. + // noinspection ResultOfMethodCallIgnored because not only making use of the side effect + directory.mkdir(); + File file = new File(filePath.toUri()); + + ArrayList tasks = new ArrayList<>(); + try { + // Create file if it does not exist. + if (file.createNewFile()) { + // If file did not exist before this, there are no tasks. + return tasks; + } + } catch (IOException e) { + throw DukeException.badData; + } + + try (Scanner scanner = new Scanner(file)) { + while (scanner.hasNext()) { + String line = scanner.nextLine(); + String[] split = line.split(" \\| "); + Task task; + switch (split[0]) { + case "T": + task = Todo.create(split[1], split[2]); + break; + case "D": + task = Deadline.create(split[1], split[2], split[3]); + break; + case "E": + task = Event.create(split[1], split[2], split[3]); + break; + default: + throw DukeException.badData; + } + + tasks.add(task); + } + } catch (FileNotFoundException e) { + // Should not happen because file is created beforehand. + return tasks; + } + + return tasks; + } + private static void list(ArrayList tasks) { for (int i = 0; i < tasks.size(); i++) { System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); @@ -120,7 +179,14 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); - ArrayList tasks = new ArrayList<>(); + ArrayList tasks; + try { + tasks = loadTasks(); + } catch (DukeException e) { + System.out.println(indentation + e.getMessage()); + // Load with empty list instead. + tasks = new ArrayList<>(); + } scanLoop: while (scanner.hasNext()) { @@ -181,5 +247,8 @@ public static void main(String[] args) { System.out.println(indentation + "Bye, hope to see you soon!"); System.out.println(horizontalLine); + + // Close scanner. + scanner.close(); } } diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java index f0b048f54c..1e4972b6b7 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/DukeException.java @@ -6,6 +6,7 @@ public class DukeException extends Exception { public final static DukeException unknownCommand = new DukeException("Unknown command!"); public final static DukeException noIndex = new DukeException("Please provide an index!"); public final static DukeException invalidIndex = new DukeException("Invalid index!"); + public final static DukeException badData = new DukeException("Bad tasks data!"); /** * Constructor for a Duke Exception, that takes in a message. diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 5eadc8052c..abe80ba063 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -43,6 +43,23 @@ public static Event create(String input) throws DukeException { return new Event(description, date); } + /** + * Factory method for an Event, with done and description and date. + * + * @param done Whether the Event is done. + * @param description Description of Event. + * @param date Date of Event. + * + * @return Event object with the given parameters. + */ + public static Event create(String done, String description, String date) { + Event event = new Event(description, date); + if (done.equals("1")) { + event.markAsDone(); + } + return event; + } + /** * Gets the string representation of an event. * diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java index 35570cfb68..3a8f1cf055 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/Todo.java @@ -29,6 +29,22 @@ public static Todo create(String description) throws DukeException { return new Todo(description); } + /** + * Factory method for a Todo, with done and description. + * + * @param done Whether the Todo is done. + * @param description Description of Todo. + * + * @return Todo object with the given parameters. + */ + public static Todo create(String done, String description) { + Todo todo = new Todo(description); + if (done.equals("1")) { + todo.markAsDone(); + } + return todo; + } + /** * Gets the string representation of a todo. * From 4a466ba0d2e37936033261b583e1eddde4991dac Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Thu, 18 Aug 2022 14:40:56 +0800 Subject: [PATCH 25/65] Save tasks to file --- .gitignore | 1 + src/main/java/Deadline.java | 9 +++++++++ src/main/java/Duke.java | 27 ++++++++++++++++++++++++++- src/main/java/Event.java | 9 +++++++++ src/main/java/Task.java | 9 +++++++++ src/main/java/Todo.java | 9 +++++++++ 6 files changed, 63 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 757d2d235f..bebac7b71e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ bin/ /text-ui-test/ACTUAL.txt text-ui-test/EXPECTED-UNIX.TXT /data +/text-ui-test/data/ diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index c1637ea87e..63eb14be95 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -60,6 +60,15 @@ public static Deadline create(String done, String description, String date) { return deadline; } + /** + * Gets the string representation of a Deadline. + * + * @return String representation of a Deadline. + */ + public String getFileFormat() { + return String.format("D | %s | %s", super.getFileFormat(), this.deadline); + } + /** * Gets the string representation of a deadline. * diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index d93110927a..df8aa5179a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,5 +1,6 @@ import java.io.File; import java.io.FileNotFoundException; +import java.io.FileWriter; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; @@ -65,6 +66,24 @@ private static ArrayList loadTasks() throws DukeException { return tasks; } + /** + * Save tasks to file. + * + * @param tasks The tasks to be saved to the file. + */ + private static void saveTasks(ArrayList tasks) throws IOException { + Path filePath = Paths.get("data/tasks"); + File file = new File(filePath.toUri()); + FileWriter fw = new FileWriter(file); + + for (Task task : tasks) { + String line = task.getFileFormat(); + fw.write(line + "\n"); + } + + fw.close(); + } + private static void list(ArrayList tasks) { for (int i = 0; i < tasks.size(); i++) { System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); @@ -208,26 +227,32 @@ public static void main(String[] args) { break; case "mark": { Duke.mark(tasks, split); + saveTasks(tasks); break; } case "unmark": { Duke.unmark(tasks, split); + saveTasks(tasks); break; } case "delete": { Duke.delete(tasks, split); + saveTasks(tasks); break; } case "todo": { Duke.todo(tasks, split); + saveTasks(tasks); break; } case "deadline": { Duke.deadline(tasks, split); + saveTasks(tasks); break; } case "event": { Duke.event(tasks, split); + saveTasks(tasks); break; } default: @@ -235,7 +260,7 @@ public static void main(String[] args) { } System.out.println(horizontalLine); - } catch (DukeException e) { + } catch (DukeException | IOException e) { System.out.println(indentation + e.getMessage()); System.out.println(horizontalLine); } catch (NumberFormatException e) { diff --git a/src/main/java/Event.java b/src/main/java/Event.java index abe80ba063..83ab3d0435 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -60,6 +60,15 @@ public static Event create(String done, String description, String date) { return event; } + /** + * Gets the string representation of an Event. + * + * @return String representation of an Event. + */ + public String getFileFormat() { + return String.format("E | %s | %s", super.getFileFormat(), this.date); + } + /** * Gets the string representation of an event. * diff --git a/src/main/java/Task.java b/src/main/java/Task.java index 2f73a35e3b..f92893dd37 100644 --- a/src/main/java/Task.java +++ b/src/main/java/Task.java @@ -32,6 +32,15 @@ public void markAsUndone() { this.isDone = false; } + /** + * Gets the task in a format for file saving. + * + * @return The task in file saving format. + */ + public String getFileFormat() { + return String.format("%s | %s", this.isDone ? "1" : "0", this.description); + } + /** * Gets the string representation of a task. * diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java index 3a8f1cf055..30384e97cb 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/Todo.java @@ -45,6 +45,15 @@ public static Todo create(String done, String description) { return todo; } + /** + * Gets the string representation of a Todo. + * + * @return String representation of a Todo. + */ + public String getFileFormat() { + return String.format("T | %s", super.getFileFormat()); + } + /** * Gets the string representation of a todo. * From 9140c0dab5af98419ef1a5ac100ec5473d6c452f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 19 Aug 2022 15:06:42 +0800 Subject: [PATCH 26/65] Change dates from String to LocalDate --- src/main/java/Deadline.java | 22 +++++++++++++++++----- src/main/java/DukeException.java | 1 + src/main/java/Event.java | 22 +++++++++++++++++----- text-ui-test/EXPECTED.TXT | 32 ++++++++++++++++---------------- text-ui-test/input.txt | 8 ++++---- 5 files changed, 55 insertions(+), 30 deletions(-) diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index b5815e8209..4e7f26cf59 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -1,13 +1,17 @@ +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + /** * Deadline is a Task that needs to be done before a specific date/time. */ public class Deadline extends Task { public final static DukeException emptyDescription = new DukeException("Description of Deadline cannot be empty!"); public final static DukeException wrongFormat = - new DukeException("Wrong format for Deadline!\n Should be 'deadline /by '."); + new DukeException("Wrong format for Deadline!\n Should be 'deadline /by YYYY-MM-DD'."); /** Deadline of the deadline. */ - private final String deadline; + private final LocalDate deadline; /** * Private constructor for a deadline, with a description and deadline. @@ -16,7 +20,7 @@ public class Deadline extends Task { * @param description Description of a deadline. * @param deadline Deadline of a deadline. */ - private Deadline(String description, String deadline) { + private Deadline(String description, LocalDate deadline) { super(description); this.deadline = deadline; } @@ -40,7 +44,13 @@ public static Deadline create(String input) throws DukeException { } String description = split[0]; String deadline = split[1]; - return new Deadline(description, deadline); + LocalDate localDate; + try { + localDate = LocalDate.parse(deadline); + } catch (DateTimeParseException e) { + throw DukeException.invalidDate; + } + return new Deadline(description, localDate); } /** @@ -50,6 +60,8 @@ public static Deadline create(String input) throws DukeException { */ @Override public String toString() { - return String.format("[D]%s (by: %s)", super.toString(), this.deadline); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy"); + String deadline = this.deadline.format(formatter); + return String.format("[D]%s (by: %s)", super.toString(), deadline); } } diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java index f0b048f54c..531aa45ffc 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/DukeException.java @@ -6,6 +6,7 @@ public class DukeException extends Exception { public final static DukeException unknownCommand = new DukeException("Unknown command!"); public final static DukeException noIndex = new DukeException("Please provide an index!"); public final static DukeException invalidIndex = new DukeException("Invalid index!"); + public final static DukeException invalidDate = new DukeException("Invalid date!"); /** * Constructor for a Duke Exception, that takes in a message. diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 5eadc8052c..68f66a08b0 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -1,13 +1,17 @@ +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + /** * Event is a Task that starts at a specific time and ends at a specific time. */ public class Event extends Task { public final static DukeException emptyDescription = new DukeException("Description of Event cannot be empty!"); public final static DukeException wrongFormat = - new DukeException("Wrong format for Event!\n Should be 'event /at '."); + new DukeException("Wrong format for Event!\n Should be 'event /at YYYY-MM-DD'."); /** Date of the event. */ - private final String date; + private final LocalDate date; /** * Private constructor for an event, with a description and date. @@ -16,7 +20,7 @@ public class Event extends Task { * @param description Description of an event. * @param date Date of an event. */ - private Event(String description, String date) { + private Event(String description, LocalDate date) { super(description); this.date = date; } @@ -40,7 +44,13 @@ public static Event create(String input) throws DukeException { } String description = split[0]; String date = split[1]; - return new Event(description, date); + LocalDate localDate; + try { + localDate = LocalDate.parse(date); + } catch (DateTimeParseException e) { + throw DukeException.invalidDate; + } + return new Event(description, localDate); } /** @@ -50,6 +60,8 @@ public static Event create(String input) throws DukeException { */ @Override public String toString() { - return String.format("[E]%s (at: %s)", super.toString(), this.date); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy"); + String date = this.date.format(formatter); + return String.format("[E]%s (at: %s)", super.toString(), date); } } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index cf93fce78c..b463404b28 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -19,12 +19,12 @@ ____________________________________________________________ ____________________________________________________________ Added this deadline! - [D][ ] return book (by: June 6th) + [D][ ] return book (by: 29 Jun 22) Now you have 2 tasks. ____________________________________________________________ ____________________________________________________________ Added this event! - [E][ ] project meeting (at: Aug 6th 2-4pm) + [E][ ] project meeting (at: 06 Aug 22) Now you have 3 tasks. ____________________________________________________________ ____________________________________________________________ @@ -43,29 +43,29 @@ ____________________________________________________________ ____________________________________________________________ 1: [T][X] read book - 2: [D][ ] return book (by: June 6th) - 3: [E][ ] project meeting (at: Aug 6th 2-4pm) + 2: [D][ ] return book (by: 29 Jun 22) + 3: [E][ ] project meeting (at: 06 Aug 22) 4: [T][X] join sports club 5: [T][ ] borrow book ____________________________________________________________ ____________________________________________________________ Added this deadline! - [D][ ] return book 2 (by: Sunday) + [D][ ] return book 2 (by: 15 Oct 19) Now you have 6 tasks. ____________________________________________________________ ____________________________________________________________ Added this event! - [E][ ] project meeting (at: Mon 2-4pm) + [E][ ] project meeting (at: 15 Oct 22) Now you have 7 tasks. ____________________________________________________________ ____________________________________________________________ 1: [T][X] read book - 2: [D][ ] return book (by: June 6th) - 3: [E][ ] project meeting (at: Aug 6th 2-4pm) + 2: [D][ ] return book (by: 29 Jun 22) + 3: [E][ ] project meeting (at: 06 Aug 22) 4: [T][X] join sports club 5: [T][ ] borrow book - 6: [D][ ] return book 2 (by: Sunday) - 7: [E][ ] project meeting (at: Mon 2-4pm) + 6: [D][ ] return book 2 (by: 15 Oct 19) + 7: [E][ ] project meeting (at: 15 Oct 22) ____________________________________________________________ ____________________________________________________________ Description of Todo cannot be empty! @@ -81,7 +81,7 @@ ____________________________________________________________ ____________________________________________________________ Wrong format for Deadline! - Should be 'deadline /by '. + Should be 'deadline /by YYYY-MM-DD'. ____________________________________________________________ ____________________________________________________________ Description of Event cannot be empty! @@ -91,7 +91,7 @@ ____________________________________________________________ ____________________________________________________________ Wrong format for Event! - Should be 'event /at '. + Should be 'event /at YYYY-MM-DD'. ____________________________________________________________ ____________________________________________________________ Unknown command! @@ -106,15 +106,15 @@ ____________________________________________________________ ____________________________________________________________ Removing this todo! - [D][ ] return book (by: June 6th) + [D][ ] return book (by: 29 Jun 22) Now you have 5 tasks. ____________________________________________________________ ____________________________________________________________ - 1: [E][ ] project meeting (at: Aug 6th 2-4pm) + 1: [E][ ] project meeting (at: 06 Aug 22) 2: [T][X] join sports club 3: [T][ ] borrow book - 4: [D][ ] return book 2 (by: Sunday) - 5: [E][ ] project meeting (at: Mon 2-4pm) + 4: [D][ ] return book 2 (by: 15 Oct 19) + 5: [E][ ] project meeting (at: 15 Oct 22) ____________________________________________________________ ____________________________________________________________ Bye, hope to see you soon! diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 5f6e45914d..564995c715 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,13 +1,13 @@ todo read book mark 1 -deadline return book /by June 6th -event project meeting /at Aug 6th 2-4pm +deadline return book /by 2022-06-29 +event project meeting /at 2022-08-06 todo join sports club mark 4 todo borrow book list -deadline return book 2 /by Sunday -event project meeting /at Mon 2-4pm +deadline return book 2 /by 2019-10-15 +event project meeting /at 2022-10-15 list todo todo From 42c07b8f582177785ea8ab7ec2c63e00f5c0c248 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 19 Aug 2022 16:09:57 +0800 Subject: [PATCH 27/65] Fix bug on reading saved dates --- src/main/java/Deadline.java | 2 +- src/main/java/Event.java | 2 +- text-ui-test/runtest.sh | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index a5b59e0907..bbcc28e4d1 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -63,7 +63,7 @@ public static Deadline create(String input) throws DukeException { * @return Deadline object with the given parameters. */ public static Deadline create(String done, String description, String date) { - Deadline deadline = new Deadline(description, date); + Deadline deadline = new Deadline(description, LocalDate.parse(date)); if (done.equals("1")) { deadline.markAsDone(); } diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 4d2a8a8de7..643c6c6a35 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -63,7 +63,7 @@ public static Event create(String input) throws DukeException { * @return Event object with the given parameters. */ public static Event create(String done, String description, String date) { - Event event = new Event(description, date); + Event event = new Event(description, LocalDate.parse(date)); if (done.equals("1")) { event.markAsDone(); } diff --git a/text-ui-test/runtest.sh b/text-ui-test/runtest.sh index c9ec870033..3517a4ee18 100644 --- a/text-ui-test/runtest.sh +++ b/text-ui-test/runtest.sh @@ -19,6 +19,9 @@ then exit 1 fi +# remove the data from previous test (if any) +rm -f data/tasks + # 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 From 6fcae4e226abc0d09c3df483154fbf541d7d424f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Fri, 19 Aug 2022 16:24:20 +0800 Subject: [PATCH 28/65] Add Storage class --- src/main/java/Duke.java | 93 ++++---------------------------------- src/main/java/Storage.java | 90 ++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 84 deletions(-) create mode 100644 src/main/java/Storage.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index df8aa5179a..e2a05d2244 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,9 +1,4 @@ -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileWriter; import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; import java.util.ArrayList; import java.util.Scanner; @@ -12,78 +7,6 @@ public class Duke { private static final String indentation = " "; private static final String horizontalLine = indentation + "____________________________________________________________"; - /** - * Load tasks from file. - * - * @return tasks The tasks loaded from the file. - */ - private static ArrayList loadTasks() throws DukeException { - Path directoryPath = Paths.get("data"); - Path filePath = Paths.get("data/tasks"); - File directory = new File(directoryPath.toUri()); - // Create directory if it does not exist. - // noinspection ResultOfMethodCallIgnored because not only making use of the side effect - directory.mkdir(); - File file = new File(filePath.toUri()); - - ArrayList tasks = new ArrayList<>(); - try { - // Create file if it does not exist. - if (file.createNewFile()) { - // If file did not exist before this, there are no tasks. - return tasks; - } - } catch (IOException e) { - throw DukeException.badData; - } - - try (Scanner scanner = new Scanner(file)) { - while (scanner.hasNext()) { - String line = scanner.nextLine(); - String[] split = line.split(" \\| "); - Task task; - switch (split[0]) { - case "T": - task = Todo.create(split[1], split[2]); - break; - case "D": - task = Deadline.create(split[1], split[2], split[3]); - break; - case "E": - task = Event.create(split[1], split[2], split[3]); - break; - default: - throw DukeException.badData; - } - - tasks.add(task); - } - } catch (FileNotFoundException e) { - // Should not happen because file is created beforehand. - return tasks; - } - - return tasks; - } - - /** - * Save tasks to file. - * - * @param tasks The tasks to be saved to the file. - */ - private static void saveTasks(ArrayList tasks) throws IOException { - Path filePath = Paths.get("data/tasks"); - File file = new File(filePath.toUri()); - FileWriter fw = new FileWriter(file); - - for (Task task : tasks) { - String line = task.getFileFormat(); - fw.write(line + "\n"); - } - - fw.close(); - } - private static void list(ArrayList tasks) { for (int i = 0; i < tasks.size(); i++) { System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); @@ -198,9 +121,11 @@ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); + Storage storage = new Storage("data", "data/tasks"); + ArrayList tasks; try { - tasks = loadTasks(); + tasks = storage.load(); } catch (DukeException e) { System.out.println(indentation + e.getMessage()); // Load with empty list instead. @@ -227,32 +152,32 @@ public static void main(String[] args) { break; case "mark": { Duke.mark(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } case "unmark": { Duke.unmark(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } case "delete": { Duke.delete(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } case "todo": { Duke.todo(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } case "deadline": { Duke.deadline(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } case "event": { Duke.event(tasks, split); - saveTasks(tasks); + storage.save(tasks); break; } default: diff --git a/src/main/java/Storage.java b/src/main/java/Storage.java new file mode 100644 index 0000000000..165fd5cb67 --- /dev/null +++ b/src/main/java/Storage.java @@ -0,0 +1,90 @@ +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Scanner; + +public class Storage { + private final String directoryPath; + private final String filePath; + + public Storage(String directoryPath, String filePath) { + this.directoryPath = directoryPath; + this.filePath = filePath; + } + + /** + * Load tasks from file. + * + * @return The tasks loaded from the file. + */ + public ArrayList load() throws DukeException { + Path directoryPath = Paths.get(this.directoryPath); + Path filePath = Paths.get(this.filePath); + File directory = new File(directoryPath.toUri()); + // Create directory if it does not exist. + // noinspection ResultOfMethodCallIgnored because not only making use of the side effect + directory.mkdir(); + File file = new File(filePath.toUri()); + + ArrayList tasks = new ArrayList<>(); + try { + // Create file if it does not exist. + if (file.createNewFile()) { + // If file did not exist before this, there are no tasks. + return tasks; + } + } catch (IOException e) { + throw DukeException.badData; + } + + try (Scanner scanner = new Scanner(file)) { + while (scanner.hasNext()) { + String line = scanner.nextLine(); + String[] split = line.split(" \\| "); + Task task; + switch (split[0]) { + case "T": + task = Todo.create(split[1], split[2]); + break; + case "D": + task = Deadline.create(split[1], split[2], split[3]); + break; + case "E": + task = Event.create(split[1], split[2], split[3]); + break; + default: + throw DukeException.badData; + } + + tasks.add(task); + } + } catch (FileNotFoundException e) { + // Should not happen because file is created beforehand. + return tasks; + } + + return tasks; + } + + /** + * Save tasks to file. + * + * @param tasks The tasks to be saved to the file. + */ + public void save(ArrayList tasks) throws IOException { + Path filePath = Paths.get(this.filePath); + File file = new File(filePath.toUri()); + FileWriter fw = new FileWriter(file); + + for (Task task : tasks) { + String line = task.getFileFormat(); + fw.write(line + "\n"); + } + + fw.close(); + } +} From 0519015e289e8c1e569e1dcc23a4de82c9d6e150 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 11:26:06 +0800 Subject: [PATCH 29/65] Add Ui class --- src/main/java/Duke.java | 99 +++++++++++++------------------- src/main/java/Ui.java | 116 ++++++++++++++++++++++++++++++++++++++ text-ui-test/EXPECTED.TXT | 35 ++---------- 3 files changed, 160 insertions(+), 90 deletions(-) create mode 100644 src/main/java/Ui.java diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index e2a05d2244..8ef91946be 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -3,17 +3,15 @@ import java.util.Scanner; public class Duke { - private static final String minorIndentation = " "; - private static final String indentation = " "; - private static final String horizontalLine = indentation + "____________________________________________________________"; + private final Ui ui; - private static void list(ArrayList tasks) { + private void list(ArrayList tasks) { for (int i = 0; i < tasks.size(); i++) { - System.out.printf(indentation + "%d: %s\n", i + 1, tasks.get(i)); + this.ui.showf("%d: %s", i + 1, tasks.get(i)); } } - private static void mark(ArrayList tasks, String[] split) throws DukeException { + private void mark(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw DukeException.noIndex; } @@ -26,11 +24,10 @@ private static void mark(ArrayList tasks, String[] split) throws DukeExcep Task task = tasks.get(i - 1); task.markAsDone(); - System.out.printf(indentation + "Marked task %d as done!\n", i); - System.out.println(indentation + minorIndentation + task); + this.ui.showMarkResult(task, i); } - private static void unmark(ArrayList tasks, String[] split) throws DukeException { + private void unmark(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw DukeException.noIndex; } @@ -43,11 +40,10 @@ private static void unmark(ArrayList tasks, String[] split) throws DukeExc Task task = tasks.get(i - 1); task.markAsUndone(); - System.out.printf(indentation + "Marked task %d as not done!\n", i); - System.out.println(indentation + minorIndentation + task); + this.ui.showUnmarkResult(task, i); } - private static void delete(ArrayList tasks, String[] split) throws DukeException { + private void delete(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw DukeException.noIndex; } @@ -61,63 +57,52 @@ private static void delete(ArrayList tasks, String[] split) throws DukeExc tasks.remove(i - 1); int numberOfTasks = tasks.size(); - System.out.println(indentation + "Removing this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + this.ui.showDeleteResult(task, numberOfTasks); } - private static void todo(ArrayList tasks, String[] split) throws DukeException { + private void todo(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw Todo.emptyDescription; } String description = split[1]; - Task task = Todo.create(description); - tasks.add(task); + Todo todo = Todo.create(description); + tasks.add(todo); int numberOfTasks = tasks.size(); - System.out.println(indentation + "Added this todo!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + this.ui.showTodoResult(todo, numberOfTasks); } - private static void deadline(ArrayList tasks, String[] split) throws DukeException { + private void deadline(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw Deadline.emptyDescription; } String descAndDate = split[1]; - Task task = Deadline.create(descAndDate); - tasks.add(task); + Deadline deadline = Deadline.create(descAndDate); + tasks.add(deadline); int numberOfTasks = tasks.size(); - System.out.println(indentation + "Added this deadline!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + this.ui.showDeadlineResult(deadline, numberOfTasks); } - private static void event(ArrayList tasks, String[] split) throws DukeException { + private void event(ArrayList tasks, String[] split) throws DukeException { if (split.length != 2) { throw Event.emptyDescription; } String descAndDate = split[1]; - Task task = Event.create(descAndDate); - tasks.add(task); + Event event = Event.create(descAndDate); + tasks.add(event); int numberOfTasks = tasks.size(); - System.out.println(indentation + "Added this event!"); - System.out.println(indentation + minorIndentation + task); - System.out.printf(indentation + "Now you have %d tasks.\n", numberOfTasks); + this.ui.showEventResult(event, numberOfTasks); + } + + public Duke() { + this.ui = new Ui(); } public static void main(String[] args) { - System.out.println(horizontalLine); - String logo = indentation + "____ _ \n" - + indentation + "| _ \\ _ _| | _____ \n" - + indentation + "| | | | | | | |/ / _ \\\n" - + indentation + "| |_| | |_| | < __/\n" - + indentation + "|____/ \\__,_|_|\\_\\___|\n"; - System.out.println(indentation + "Hello I'm\n" + logo); - System.out.println(indentation + "What can I do for you?"); - System.out.println(horizontalLine); + Duke duke = new Duke(); + duke.ui.showWelcomeMessage(); Scanner scanner = new Scanner(System.in); @@ -127,7 +112,7 @@ public static void main(String[] args) { try { tasks = storage.load(); } catch (DukeException e) { - System.out.println(indentation + e.getMessage()); + duke.ui.showErrorMessage(e); // Load with empty list instead. tasks = new ArrayList<>(); } @@ -140,63 +125,57 @@ public static void main(String[] args) { String[] split = input.split(" ", 2); String command = split[0]; - System.out.println(horizontalLine); - // Handle the various commands. switch (command) { case "bye": // Stops the application, by breaking out of the scan loop. break scanLoop; case "list": - Duke.list(tasks); + duke.list(tasks); break; case "mark": { - Duke.mark(tasks, split); + duke.mark(tasks, split); storage.save(tasks); break; } case "unmark": { - Duke.unmark(tasks, split); + duke.unmark(tasks, split); storage.save(tasks); break; } case "delete": { - Duke.delete(tasks, split); + duke.delete(tasks, split); storage.save(tasks); break; } case "todo": { - Duke.todo(tasks, split); + duke.todo(tasks, split); storage.save(tasks); break; } case "deadline": { - Duke.deadline(tasks, split); + duke.deadline(tasks, split); storage.save(tasks); break; } case "event": { - Duke.event(tasks, split); + duke.event(tasks, split); storage.save(tasks); break; } default: throw DukeException.unknownCommand; } - - System.out.println(horizontalLine); + duke.ui.showLineBreak(); } catch (DukeException | IOException e) { - System.out.println(indentation + e.getMessage()); - System.out.println(horizontalLine); + duke.ui.showErrorMessage(e); } catch (NumberFormatException e) { // Handles case where user inputs an invalid number. - System.out.println(indentation + "Invalid number!"); - System.out.println(horizontalLine); + duke.ui.showErrorMessage("Invalid number!"); } } - System.out.println(indentation + "Bye, hope to see you soon!"); - System.out.println(horizontalLine); + duke.ui.showGoodbyeMessage(); // Close scanner. scanner.close(); diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java new file mode 100644 index 0000000000..cf689603ed --- /dev/null +++ b/src/main/java/Ui.java @@ -0,0 +1,116 @@ +public class Ui { + private static final String minorIndentation = " "; + private static final String indentation = " "; + private static final String horizontalLine = "____________________________________________________________"; + + /** + * Show messages to the user. + * + * @param messages List of messages to be shown. + */ + public void show(String... messages) { + for (String m : messages) { + System.out.println(indentation + m); + } + } + + /** + * Shows a formatted message to the user. + * + * @param format A format string. + * @param args Arguments referenced by format string. + */ + public void showf(String format, Object... args) { + String message = String.format(format, args); + this.show(message); + } + + public void showLineBreak() { + this.show(horizontalLine); + } + + public void showWelcomeMessage() { + this.show( + horizontalLine, + "Hello I'm", + "____ _ ", + "| _ \\ _ _| | _____ ", + "| | | | | | | |/ / _ \\", + "| |_| | |_| | < __/", + "|____/ \\__,_|_|\\_\\___|", + "", + "What can I do for you?", + horizontalLine + ); + } + + public void showGoodbyeMessage() { + this.show( + "Bye, hope to see you soon!", + horizontalLine + ); + } + + public void showErrorMessage(String message) { + this.show( + message, + horizontalLine + ); + } + + public void showErrorMessage(Exception exception) { + this.showErrorMessage(exception.getMessage()); + } + + public void showMarkResult(Task task, int taskIndex) { + String markedTask = String.format("Marked task %d as done!", taskIndex); + this.show( + markedTask, + minorIndentation + task + ); + } + + public void showUnmarkResult(Task task, int taskIndex) { + String unmarkedTask = String.format("Marked task %d as not done!", taskIndex); + this.show( + unmarkedTask, + minorIndentation + task + ); + } + + public void showDeleteResult(Task task, int numberOfTasksLeft) { + String tasksLeft = String.format("Now you have %d tasks left.", numberOfTasksLeft); + this.show( + "Removing this task!", + minorIndentation + task, + tasksLeft + ); + } + + public void showTodoResult(Todo todo, int numberOfTasks) { + String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); + this.show( + "Added this todo!", + minorIndentation + todo, + tasksLeft + ); + } + + public void showDeadlineResult(Deadline deadline, int numberOfTasks) { + String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); + this.show( + "Added this deadline!", + minorIndentation + deadline, + tasksLeft + ); + } + + public void showEventResult(Event event, int numberOfTasks) { + String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); + this.show( + "Added this event!", + minorIndentation + event, + tasksLeft + ); + } +} diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index b463404b28..dfb31a6242 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -5,60 +5,49 @@ | | | | | | | |/ / _ \ | |_| | |_| | < __/ |____/ \__,_|_|\_\___| - + What can I do for you? ____________________________________________________________ - ____________________________________________________________ Added this todo! [T][ ] read book Now you have 1 tasks. ____________________________________________________________ - ____________________________________________________________ Marked task 1 as done! [T][X] read book ____________________________________________________________ - ____________________________________________________________ Added this deadline! [D][ ] return book (by: 29 Jun 22) Now you have 2 tasks. ____________________________________________________________ - ____________________________________________________________ Added this event! [E][ ] project meeting (at: 06 Aug 22) Now you have 3 tasks. ____________________________________________________________ - ____________________________________________________________ Added this todo! [T][ ] join sports club Now you have 4 tasks. ____________________________________________________________ - ____________________________________________________________ Marked task 4 as done! [T][X] join sports club ____________________________________________________________ - ____________________________________________________________ Added this todo! [T][ ] borrow book Now you have 5 tasks. ____________________________________________________________ - ____________________________________________________________ 1: [T][X] read book 2: [D][ ] return book (by: 29 Jun 22) 3: [E][ ] project meeting (at: 06 Aug 22) 4: [T][X] join sports club 5: [T][ ] borrow book ____________________________________________________________ - ____________________________________________________________ Added this deadline! [D][ ] return book 2 (by: 15 Oct 19) Now you have 6 tasks. ____________________________________________________________ - ____________________________________________________________ Added this event! [E][ ] project meeting (at: 15 Oct 22) Now you have 7 tasks. ____________________________________________________________ - ____________________________________________________________ 1: [T][X] read book 2: [D][ ] return book (by: 29 Jun 22) 3: [E][ ] project meeting (at: 06 Aug 22) @@ -67,48 +56,35 @@ 6: [D][ ] return book 2 (by: 15 Oct 19) 7: [E][ ] project meeting (at: 15 Oct 22) ____________________________________________________________ - ____________________________________________________________ Description of Todo cannot be empty! ____________________________________________________________ - ____________________________________________________________ Description of Todo cannot be empty! ____________________________________________________________ - ____________________________________________________________ Description of Deadline cannot be empty! ____________________________________________________________ - ____________________________________________________________ Description of Deadline cannot be empty! ____________________________________________________________ - ____________________________________________________________ Wrong format for Deadline! Should be 'deadline /by YYYY-MM-DD'. ____________________________________________________________ - ____________________________________________________________ Description of Event cannot be empty! ____________________________________________________________ - ____________________________________________________________ Description of Event cannot be empty! ____________________________________________________________ - ____________________________________________________________ Wrong format for Event! Should be 'event /at YYYY-MM-DD'. ____________________________________________________________ - ____________________________________________________________ Unknown command! ____________________________________________________________ - ____________________________________________________________ Unknown command! ____________________________________________________________ - ____________________________________________________________ - Removing this todo! + Removing this task! [T][X] read book - Now you have 6 tasks. - ____________________________________________________________ + Now you have 6 tasks left. ____________________________________________________________ - Removing this todo! + Removing this task! [D][ ] return book (by: 29 Jun 22) - Now you have 5 tasks. - ____________________________________________________________ + Now you have 5 tasks left. ____________________________________________________________ 1: [E][ ] project meeting (at: 06 Aug 22) 2: [T][X] join sports club @@ -116,6 +92,5 @@ 4: [D][ ] return book 2 (by: 15 Oct 19) 5: [E][ ] project meeting (at: 15 Oct 22) ____________________________________________________________ - ____________________________________________________________ Bye, hope to see you soon! ____________________________________________________________ From ece4fe4e15dfcb0491bdadbcd83d539b583c1b1a Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 13:45:14 +0800 Subject: [PATCH 30/65] Add Command, CommandResult and *Command classes --- src/main/java/Command.java | 3 + src/main/java/CommandResult.java | 17 ++++ src/main/java/Deadline.java | 36 +------- src/main/java/DeadlineCommand.java | 41 +++++++++ src/main/java/DeleteCommand.java | 25 ++++++ src/main/java/Duke.java | 136 ++++++----------------------- src/main/java/Event.java | 36 +------- src/main/java/EventCommand.java | 41 +++++++++ src/main/java/ListCommand.java | 22 +++++ src/main/java/MarkCommand.java | 24 +++++ src/main/java/Todo.java | 19 +--- src/main/java/TodoCommand.java | 24 +++++ src/main/java/Ui.java | 68 ++------------- src/main/java/UnmarkCommand.java | 24 +++++ text-ui-test/EXPECTED.TXT | 12 ++- 15 files changed, 269 insertions(+), 259 deletions(-) create mode 100644 src/main/java/Command.java create mode 100644 src/main/java/CommandResult.java create mode 100644 src/main/java/DeadlineCommand.java create mode 100644 src/main/java/DeleteCommand.java create mode 100644 src/main/java/EventCommand.java create mode 100644 src/main/java/ListCommand.java create mode 100644 src/main/java/MarkCommand.java create mode 100644 src/main/java/TodoCommand.java create mode 100644 src/main/java/UnmarkCommand.java diff --git a/src/main/java/Command.java b/src/main/java/Command.java new file mode 100644 index 0000000000..34529bd01b --- /dev/null +++ b/src/main/java/Command.java @@ -0,0 +1,3 @@ +public abstract class Command { + public abstract CommandResult execute(); +} diff --git a/src/main/java/CommandResult.java b/src/main/java/CommandResult.java new file mode 100644 index 0000000000..fbe1e096f6 --- /dev/null +++ b/src/main/java/CommandResult.java @@ -0,0 +1,17 @@ +public class CommandResult { + private final String userMessage; + private final boolean hasUpdates; + + public CommandResult(String userMessage, boolean hasUpdates) { + this.userMessage = userMessage; + this.hasUpdates = hasUpdates; + } + + public String getUserMessage() { + return this.userMessage; + } + + public boolean shouldUpdateFile() { + return this.hasUpdates; + } +} diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index bbcc28e4d1..eda5b4e01c 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -1,58 +1,28 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; /** * Deadline is a Task that needs to be done before a specific date/time. */ public class Deadline extends Task { - public final static DukeException emptyDescription = new DukeException("Description of Deadline cannot be empty!"); public final static DukeException wrongFormat = - new DukeException("Wrong format for Deadline!\n Should be 'deadline /by YYYY-MM-DD'."); + new DukeException("Wrong format for Deadline!\nShould be 'deadline /by YYYY-MM-DD'."); /** Deadline of the deadline. */ private final LocalDate deadline; /** - * Private constructor for a deadline, with a description and deadline. + * Constructor for a deadline, with a description and deadline. * Deadline is set as "not done" when created. * * @param description Description of a deadline. * @param deadline Deadline of a deadline. */ - private Deadline(String description, LocalDate deadline) { + public Deadline(String description, LocalDate deadline) { super(description); this.deadline = deadline; } - /** - * Factory Method for a Deadline, with a user input. - * Deadline is set as "not done" when created. - * - * @param input User input. - * - * @return Deadline object with the given user input. - */ - public static Deadline create(String input) throws DukeException { - if (input.length() < 1) { - throw Deadline.emptyDescription; - } - // Split the input into description and date with the separator of "/by". - String[] split = input.split(" /by "); - if (split.length != 2) { - throw wrongFormat; - } - String description = split[0]; - String deadline = split[1]; - LocalDate localDate; - try { - localDate = LocalDate.parse(deadline); - } catch (DateTimeParseException e) { - throw DukeException.invalidDate; - } - return new Deadline(description, localDate); - } - /** * Factory method for a Deadline, with done and description and date. * diff --git a/src/main/java/DeadlineCommand.java b/src/main/java/DeadlineCommand.java new file mode 100644 index 0000000000..f87276aded --- /dev/null +++ b/src/main/java/DeadlineCommand.java @@ -0,0 +1,41 @@ +import java.time.LocalDate; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class DeadlineCommand extends Command { + private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); + private static final String userMessageFormat = "Added this deadline!\n %s\nNow you have %d tasks."; + private final ArrayList tasks; + private final Deadline deadline; + + public DeadlineCommand(ArrayList tasks, String arguments) throws DukeException { + Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); + String description, deadline; + if (matcher.matches()) { + description = matcher.group("description"); + deadline = matcher.group("deadline"); + } else { + throw Deadline.wrongFormat; + } + + LocalDate localDate; + try { + localDate = LocalDate.parse(deadline); + } catch (DateTimeParseException e) { + throw DukeException.invalidDate; + } + + this.tasks = tasks; + this.deadline = new Deadline(description, localDate); + } + + @Override + public CommandResult execute() { + this.tasks.add(this.deadline); + int numberOfTasks = this.tasks.size(); + String userMessage = String.format(userMessageFormat, this.deadline, numberOfTasks); + return new CommandResult(userMessage, true); + } +} diff --git a/src/main/java/DeleteCommand.java b/src/main/java/DeleteCommand.java new file mode 100644 index 0000000000..43598ed54a --- /dev/null +++ b/src/main/java/DeleteCommand.java @@ -0,0 +1,25 @@ +import java.util.ArrayList; + +public class DeleteCommand extends Command { + private static final String userMessageFormat = "Removing this task!\n %s\nNow you have %d tasks left."; + private final int index; + private final ArrayList tasks; + + public DeleteCommand(ArrayList tasks, String arguments) throws DukeException { + int i = Integer.parseInt(arguments); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + this.tasks = tasks; + this.index = i; + } + + @Override + public CommandResult execute() { + Task task = tasks.get(this.index - 1); + tasks.remove(this.index - 1); + int numberOfTasks = tasks.size(); + String userMessage = String.format(userMessageFormat, task, numberOfTasks); + return new CommandResult(userMessage, true); + } +} diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 8ef91946be..8406684580 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,101 +1,12 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class Duke { private final Ui ui; - private void list(ArrayList tasks) { - for (int i = 0; i < tasks.size(); i++) { - this.ui.showf("%d: %s", i + 1, tasks.get(i)); - } - } - - private void mark(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - task.markAsDone(); - - this.ui.showMarkResult(task, i); - } - - private void unmark(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - task.markAsUndone(); - - this.ui.showUnmarkResult(task, i); - } - - private void delete(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw DukeException.noIndex; - } - String indexInput = split[1]; - int i = Integer.parseInt(indexInput); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - // Subtract 1 to account for 0-index data structure. - Task task = tasks.get(i - 1); - tasks.remove(i - 1); - int numberOfTasks = tasks.size(); - - this.ui.showDeleteResult(task, numberOfTasks); - } - - private void todo(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw Todo.emptyDescription; - } - String description = split[1]; - Todo todo = Todo.create(description); - tasks.add(todo); - int numberOfTasks = tasks.size(); - - this.ui.showTodoResult(todo, numberOfTasks); - } - - private void deadline(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw Deadline.emptyDescription; - } - String descAndDate = split[1]; - Deadline deadline = Deadline.create(descAndDate); - tasks.add(deadline); - int numberOfTasks = tasks.size(); - - this.ui.showDeadlineResult(deadline, numberOfTasks); - } - - private void event(ArrayList tasks, String[] split) throws DukeException { - if (split.length != 2) { - throw Event.emptyDescription; - } - String descAndDate = split[1]; - Event event = Event.create(descAndDate); - tasks.add(event); - int numberOfTasks = tasks.size(); - - this.ui.showEventResult(event, numberOfTasks); - } - public Duke() { this.ui = new Ui(); } @@ -120,52 +31,59 @@ public static void main(String[] args) { scanLoop: while (scanner.hasNext()) { try { - String input = scanner.nextLine(); - - String[] split = input.split(" ", 2); - String command = split[0]; + String userInput = scanner.nextLine(); + + Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)\\s?(?.*)"); + Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput); + String commandWord, arguments; + if (matcher.matches()) { + commandWord = matcher.group("commandWord"); + arguments = matcher.group("arguments"); + } else { + throw DukeException.unknownCommand; + } + Command command; // Handle the various commands. - switch (command) { + switch (commandWord) { case "bye": // Stops the application, by breaking out of the scan loop. break scanLoop; case "list": - duke.list(tasks); + command = new ListCommand(tasks); break; case "mark": { - duke.mark(tasks, split); - storage.save(tasks); + command = new MarkCommand(tasks, arguments); break; } case "unmark": { - duke.unmark(tasks, split); - storage.save(tasks); + command = new UnmarkCommand(tasks, arguments); break; } case "delete": { - duke.delete(tasks, split); - storage.save(tasks); + command = new DeleteCommand(tasks, arguments); break; } case "todo": { - duke.todo(tasks, split); - storage.save(tasks); + command = new TodoCommand(tasks, arguments); break; } case "deadline": { - duke.deadline(tasks, split); - storage.save(tasks); + command = new DeadlineCommand(tasks, arguments); break; } case "event": { - duke.event(tasks, split); - storage.save(tasks); + command = new EventCommand(tasks, arguments); break; } default: throw DukeException.unknownCommand; } + CommandResult result = command.execute(); + duke.ui.showResult(result); + if (result.shouldUpdateFile()) { + storage.save(tasks); + } duke.ui.showLineBreak(); } catch (DukeException | IOException e) { duke.ui.showErrorMessage(e); diff --git a/src/main/java/Event.java b/src/main/java/Event.java index 643c6c6a35..68fa1776c3 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -1,58 +1,28 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; /** * Event is a Task that starts at a specific time and ends at a specific time. */ public class Event extends Task { - public final static DukeException emptyDescription = new DukeException("Description of Event cannot be empty!"); public final static DukeException wrongFormat = - new DukeException("Wrong format for Event!\n Should be 'event /at YYYY-MM-DD'."); + new DukeException("Wrong format for Event!\nShould be 'event /at YYYY-MM-DD'."); /** Date of the event. */ private final LocalDate date; /** - * Private constructor for an event, with a description and date. + * Constructor for an event, with a description and date. * Event is set as "not done" when created. * * @param description Description of an event. * @param date Date of an event. */ - private Event(String description, LocalDate date) { + public Event(String description, LocalDate date) { super(description); this.date = date; } - /** - * Factory Method for an Event, with a user input. - * Event is set as "not done" when created. - * - * @param input User input. - * - * @return Event object with the given user input. - */ - public static Event create(String input) throws DukeException { - if (input.length() < 1) { - throw Event.emptyDescription; - } - // Split the input into description and date with the separator of "/at". - String[] split = input.split(" /at "); - if (split.length != 2) { - throw Event.wrongFormat; - } - String description = split[0]; - String date = split[1]; - LocalDate localDate; - try { - localDate = LocalDate.parse(date); - } catch (DateTimeParseException e) { - throw DukeException.invalidDate; - } - return new Event(description, localDate); - } - /** * Factory method for an Event, with done and description and date. * diff --git a/src/main/java/EventCommand.java b/src/main/java/EventCommand.java new file mode 100644 index 0000000000..88793af012 --- /dev/null +++ b/src/main/java/EventCommand.java @@ -0,0 +1,41 @@ +import java.time.LocalDate; +import java.time.format.DateTimeParseException; +import java.util.ArrayList; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class EventCommand extends Command { + private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); + private static final String userMessageFormat = "Added this event!\n %s\nNow you have %d tasks."; + private final ArrayList tasks; + private final Event event; + + public EventCommand(ArrayList tasks, String arguments) throws DukeException { + Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); + String description, date; + if (matcher.matches()) { + description = matcher.group("description"); + date = matcher.group("date"); + } else { + throw Event.wrongFormat; + } + + LocalDate localDate; + try { + localDate = LocalDate.parse(date); + } catch (DateTimeParseException e) { + throw DukeException.invalidDate; + } + + this.tasks = tasks; + this.event = new Event(description, localDate); + } + + @Override + public CommandResult execute() { + this.tasks.add(this.event); + int numberOfTasks = this.tasks.size(); + String userMessage = String.format(userMessageFormat, this.event, numberOfTasks); + return new CommandResult(userMessage, true); + } +} diff --git a/src/main/java/ListCommand.java b/src/main/java/ListCommand.java new file mode 100644 index 0000000000..a71d36cee4 --- /dev/null +++ b/src/main/java/ListCommand.java @@ -0,0 +1,22 @@ +import java.util.ArrayList; + +public class ListCommand extends Command { + private static final String lineFormat = "%d: %s"; + private final ArrayList tasks; + + public ListCommand(ArrayList tasks) { + this.tasks = tasks; + } + + @Override + public CommandResult execute() { + String[] lines = new String[this.tasks.size()]; + + for (int i = 0; i < tasks.size(); i++) { + lines[i] = String.format(lineFormat, i + 1, this.tasks.get(i)); + } + + String userMessage = String.join("\n", lines); + return new CommandResult(userMessage, false); + } +} diff --git a/src/main/java/MarkCommand.java b/src/main/java/MarkCommand.java new file mode 100644 index 0000000000..f3e000cd5f --- /dev/null +++ b/src/main/java/MarkCommand.java @@ -0,0 +1,24 @@ +import java.util.ArrayList; + +public class MarkCommand extends Command { + private static final String userMessageFormat = "Marked task %d as done!\n %s"; + private final int index; + private final Task task; + + public MarkCommand(ArrayList tasks, String arguments) throws DukeException { + int i = Integer.parseInt(arguments); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + this.index = i; + // Subtract 1 to account for 0-index data structure. + this.task = tasks.get(this.index - 1); + } + + @Override + public CommandResult execute() { + task.markAsDone(); + String userMessage = String.format(userMessageFormat, this.index, this.task); + return new CommandResult(userMessage, true); + } +} diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java index 30384e97cb..b4c0818d20 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/Todo.java @@ -5,30 +5,15 @@ public class Todo extends Task { public final static DukeException emptyDescription = new DukeException("Description of Todo cannot be empty!"); /** - * Private constructor for a Todo, with a description. + * Constructor for a Todo, with a description. * Todo is set as "not done" when created. * * @param description Description of a todo. */ - private Todo(String description) { + public Todo(String description) { super(description); } - /** - * Factory Method for a Todo, with a user input. - * Todo is set as "not done" when created. - * - * @param description Description of Todo. - * - * @return Todo object with the given user input. - */ - public static Todo create(String description) throws DukeException { - if (description.length() < 1) { - throw Todo.emptyDescription; - } - return new Todo(description); - } - /** * Factory method for a Todo, with done and description. * diff --git a/src/main/java/TodoCommand.java b/src/main/java/TodoCommand.java new file mode 100644 index 0000000000..91c5e72f81 --- /dev/null +++ b/src/main/java/TodoCommand.java @@ -0,0 +1,24 @@ +import java.util.ArrayList; + +public class TodoCommand extends Command { + private static final String userMessageFormat = "Added this todo!\n %s\nNow you have %d tasks."; + private final ArrayList tasks; + private final Todo todo; + + public TodoCommand(ArrayList tasks, String arguments) throws DukeException { + if (arguments.length() < 1) { + throw Todo.emptyDescription; + } + + this.tasks = tasks; + this.todo = new Todo(arguments); + } + + @Override + public CommandResult execute() { + this.tasks.add(this.todo); + int numberOfTasks = this.tasks.size(); + String userMessage = String.format(userMessageFormat, this.todo, numberOfTasks); + return new CommandResult(userMessage, true); + } +} diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java index cf689603ed..901882819f 100644 --- a/src/main/java/Ui.java +++ b/src/main/java/Ui.java @@ -1,7 +1,7 @@ public class Ui { - private static final String minorIndentation = " "; private static final String indentation = " "; private static final String horizontalLine = "____________________________________________________________"; + private static final String lineSeparator = System.lineSeparator(); /** * Show messages to the user. @@ -10,21 +10,11 @@ public class Ui { */ public void show(String... messages) { for (String m : messages) { - System.out.println(indentation + m); + // Formats message. + System.out.println(indentation + m.replace("\n", lineSeparator + indentation)); } } - /** - * Shows a formatted message to the user. - * - * @param format A format string. - * @param args Arguments referenced by format string. - */ - public void showf(String format, Object... args) { - String message = String.format(format, args); - this.show(message); - } - public void showLineBreak() { this.show(horizontalLine); } @@ -62,55 +52,7 @@ public void showErrorMessage(Exception exception) { this.showErrorMessage(exception.getMessage()); } - public void showMarkResult(Task task, int taskIndex) { - String markedTask = String.format("Marked task %d as done!", taskIndex); - this.show( - markedTask, - minorIndentation + task - ); - } - - public void showUnmarkResult(Task task, int taskIndex) { - String unmarkedTask = String.format("Marked task %d as not done!", taskIndex); - this.show( - unmarkedTask, - minorIndentation + task - ); - } - - public void showDeleteResult(Task task, int numberOfTasksLeft) { - String tasksLeft = String.format("Now you have %d tasks left.", numberOfTasksLeft); - this.show( - "Removing this task!", - minorIndentation + task, - tasksLeft - ); - } - - public void showTodoResult(Todo todo, int numberOfTasks) { - String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); - this.show( - "Added this todo!", - minorIndentation + todo, - tasksLeft - ); - } - - public void showDeadlineResult(Deadline deadline, int numberOfTasks) { - String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); - this.show( - "Added this deadline!", - minorIndentation + deadline, - tasksLeft - ); - } - - public void showEventResult(Event event, int numberOfTasks) { - String tasksLeft = String.format("Now you have %d tasks.", numberOfTasks); - this.show( - "Added this event!", - minorIndentation + event, - tasksLeft - ); + public void showResult(CommandResult result) { + this.show(result.getUserMessage()); } } diff --git a/src/main/java/UnmarkCommand.java b/src/main/java/UnmarkCommand.java new file mode 100644 index 0000000000..a7df24d1af --- /dev/null +++ b/src/main/java/UnmarkCommand.java @@ -0,0 +1,24 @@ +import java.util.ArrayList; + +public class UnmarkCommand extends Command { + private static final String userMessageFormat = "Marked task %d as not done!\n %s"; + private final int index; + private final Task task; + + public UnmarkCommand(ArrayList tasks, String arguments) throws DukeException { + int i = Integer.parseInt(arguments); + if (i <= 0 || i > tasks.size()) { + throw DukeException.invalidIndex; + } + this.index = i; + // Subtract 1 to account for 0-index data structure. + this.task = tasks.get(this.index - 1); + } + + @Override + public CommandResult execute() { + task.markAsUndone(); + String userMessage = String.format(userMessageFormat, this.index, this.task); + return new CommandResult(userMessage, true); + } +} diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index dfb31a6242..17b8d5ee7a 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -60,16 +60,20 @@ ____________________________________________________________ Description of Todo cannot be empty! ____________________________________________________________ - Description of Deadline cannot be empty! + Wrong format for Deadline! + Should be 'deadline /by YYYY-MM-DD'. ____________________________________________________________ - Description of Deadline cannot be empty! + Wrong format for Deadline! + Should be 'deadline /by YYYY-MM-DD'. ____________________________________________________________ Wrong format for Deadline! Should be 'deadline /by YYYY-MM-DD'. ____________________________________________________________ - Description of Event cannot be empty! + Wrong format for Event! + Should be 'event /at YYYY-MM-DD'. ____________________________________________________________ - Description of Event cannot be empty! + Wrong format for Event! + Should be 'event /at YYYY-MM-DD'. ____________________________________________________________ Wrong format for Event! Should be 'event /at YYYY-MM-DD'. From 4176f241850af382922a866d1e435366ab726381 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 14:20:17 +0800 Subject: [PATCH 31/65] Add Parser class --- src/main/java/Command.java | 10 ++++- src/main/java/CommandResult.java | 8 +++- src/main/java/DeadlineCommand.java | 8 ++-- src/main/java/DeleteCommand.java | 28 +++++++------- src/main/java/Duke.java | 62 +++++------------------------- src/main/java/DukeException.java | 2 - src/main/java/EventCommand.java | 8 ++-- src/main/java/ExitCommand.java | 7 ++++ src/main/java/ListCommand.java | 10 +---- src/main/java/MarkCommand.java | 26 ++++++------- src/main/java/Parser.java | 56 +++++++++++++++++++++++++++ src/main/java/TodoCommand.java | 9 ++--- src/main/java/Ui.java | 6 +-- src/main/java/UnmarkCommand.java | 26 ++++++------- 14 files changed, 138 insertions(+), 128 deletions(-) create mode 100644 src/main/java/ExitCommand.java create mode 100644 src/main/java/Parser.java diff --git a/src/main/java/Command.java b/src/main/java/Command.java index 34529bd01b..f7952a5f84 100644 --- a/src/main/java/Command.java +++ b/src/main/java/Command.java @@ -1,3 +1,11 @@ +import java.util.ArrayList; + public abstract class Command { - public abstract CommandResult execute(); + protected ArrayList tasks; + + protected void setData(ArrayList tasks) { + this.tasks = tasks; + } + + public abstract CommandResult execute() throws DukeException; } diff --git a/src/main/java/CommandResult.java b/src/main/java/CommandResult.java index fbe1e096f6..6ffb5a5a3c 100644 --- a/src/main/java/CommandResult.java +++ b/src/main/java/CommandResult.java @@ -1,10 +1,12 @@ public class CommandResult { private final String userMessage; private final boolean hasUpdates; + private final boolean isExit; - public CommandResult(String userMessage, boolean hasUpdates) { + public CommandResult(String userMessage, boolean hasUpdates, boolean isExit) { this.userMessage = userMessage; this.hasUpdates = hasUpdates; + this.isExit = isExit; } public String getUserMessage() { @@ -14,4 +16,8 @@ public String getUserMessage() { public boolean shouldUpdateFile() { return this.hasUpdates; } + + public boolean shouldExit() { + return this.isExit; + } } diff --git a/src/main/java/DeadlineCommand.java b/src/main/java/DeadlineCommand.java index f87276aded..e95f077110 100644 --- a/src/main/java/DeadlineCommand.java +++ b/src/main/java/DeadlineCommand.java @@ -1,16 +1,15 @@ import java.time.LocalDate; import java.time.format.DateTimeParseException; -import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; public class DeadlineCommand extends Command { + public static final String COMMAND_WORD = "deadline"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this deadline!\n %s\nNow you have %d tasks."; - private final ArrayList tasks; private final Deadline deadline; - public DeadlineCommand(ArrayList tasks, String arguments) throws DukeException { + public DeadlineCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); String description, deadline; if (matcher.matches()) { @@ -27,7 +26,6 @@ public DeadlineCommand(ArrayList tasks, String arguments) throws DukeExcep throw DukeException.invalidDate; } - this.tasks = tasks; this.deadline = new Deadline(description, localDate); } @@ -36,6 +34,6 @@ public CommandResult execute() { this.tasks.add(this.deadline); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.deadline, numberOfTasks); - return new CommandResult(userMessage, true); + return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/DeleteCommand.java b/src/main/java/DeleteCommand.java index 43598ed54a..1d90afcb6a 100644 --- a/src/main/java/DeleteCommand.java +++ b/src/main/java/DeleteCommand.java @@ -1,25 +1,23 @@ -import java.util.ArrayList; - public class DeleteCommand extends Command { + public static final String COMMAND_WORD = "delete"; private static final String userMessageFormat = "Removing this task!\n %s\nNow you have %d tasks left."; private final int index; - private final ArrayList tasks; - public DeleteCommand(ArrayList tasks, String arguments) throws DukeException { - int i = Integer.parseInt(arguments); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - this.tasks = tasks; - this.index = i; + public DeleteCommand(String arguments) { + this.index = Integer.parseInt(arguments); } @Override - public CommandResult execute() { - Task task = tasks.get(this.index - 1); - tasks.remove(this.index - 1); - int numberOfTasks = tasks.size(); + public CommandResult execute() throws DukeException { + // Check if index is out of bounds. + if (this.index <= 0 || this.index > this.tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = this.tasks.get(this.index - 1); + this.tasks.remove(this.index - 1); + int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, task, numberOfTasks); - return new CommandResult(userMessage, true); + return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 8406684580..3af623cf90 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,14 +1,14 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class Duke { private final Ui ui; + private final Parser parser; public Duke() { this.ui = new Ui(); + this.parser = new Parser(); } public static void main(String[] args) { @@ -28,63 +28,21 @@ public static void main(String[] args) { tasks = new ArrayList<>(); } - scanLoop: while (scanner.hasNext()) { try { String userInput = scanner.nextLine(); - - Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)\\s?(?.*)"); - Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput); - String commandWord, arguments; - if (matcher.matches()) { - commandWord = matcher.group("commandWord"); - arguments = matcher.group("arguments"); - } else { - throw DukeException.unknownCommand; - } - Command command; - - // Handle the various commands. - switch (commandWord) { - case "bye": - // Stops the application, by breaking out of the scan loop. - break scanLoop; - case "list": - command = new ListCommand(tasks); - break; - case "mark": { - command = new MarkCommand(tasks, arguments); - break; - } - case "unmark": { - command = new UnmarkCommand(tasks, arguments); - break; - } - case "delete": { - command = new DeleteCommand(tasks, arguments); - break; - } - case "todo": { - command = new TodoCommand(tasks, arguments); - break; - } - case "deadline": { - command = new DeadlineCommand(tasks, arguments); - break; - } - case "event": { - command = new EventCommand(tasks, arguments); - break; - } - default: - throw DukeException.unknownCommand; - } + Command command = duke.parser.parseCommand(userInput); + // Populate command with tasks. + command.setData(tasks); CommandResult result = command.execute(); - duke.ui.showResult(result); + if (result.shouldExit()) { + // Exit application by exiting the scan loop. + break; + } if (result.shouldUpdateFile()) { storage.save(tasks); } - duke.ui.showLineBreak(); + duke.ui.showResult(result); } catch (DukeException | IOException e) { duke.ui.showErrorMessage(e); } catch (NumberFormatException e) { diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java index 5317b677ca..454a0e3d4a 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/DukeException.java @@ -3,8 +3,6 @@ */ public class DukeException extends Exception { // Some commonly used exceptions. - public final static DukeException unknownCommand = new DukeException("Unknown command!"); - public final static DukeException noIndex = new DukeException("Please provide an index!"); public final static DukeException invalidIndex = new DukeException("Invalid index!"); public final static DukeException invalidDate = new DukeException("Invalid date!"); public final static DukeException badData = new DukeException("Bad tasks data!"); diff --git a/src/main/java/EventCommand.java b/src/main/java/EventCommand.java index 88793af012..5f8e3fd702 100644 --- a/src/main/java/EventCommand.java +++ b/src/main/java/EventCommand.java @@ -1,16 +1,15 @@ import java.time.LocalDate; import java.time.format.DateTimeParseException; -import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; public class EventCommand extends Command { + public static final String COMMAND_WORD = "event"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this event!\n %s\nNow you have %d tasks."; - private final ArrayList tasks; private final Event event; - public EventCommand(ArrayList tasks, String arguments) throws DukeException { + public EventCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); String description, date; if (matcher.matches()) { @@ -27,7 +26,6 @@ public EventCommand(ArrayList tasks, String arguments) throws DukeExceptio throw DukeException.invalidDate; } - this.tasks = tasks; this.event = new Event(description, localDate); } @@ -36,6 +34,6 @@ public CommandResult execute() { this.tasks.add(this.event); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.event, numberOfTasks); - return new CommandResult(userMessage, true); + return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/ExitCommand.java b/src/main/java/ExitCommand.java new file mode 100644 index 0000000000..e9dde83c34 --- /dev/null +++ b/src/main/java/ExitCommand.java @@ -0,0 +1,7 @@ +public class ExitCommand extends Command { + public static final String COMMAND_WORD = "bye"; + + public CommandResult execute() { + return new CommandResult("", false, true); + } +} diff --git a/src/main/java/ListCommand.java b/src/main/java/ListCommand.java index a71d36cee4..a525e8db09 100644 --- a/src/main/java/ListCommand.java +++ b/src/main/java/ListCommand.java @@ -1,12 +1,6 @@ -import java.util.ArrayList; - public class ListCommand extends Command { + public static final String COMMAND_WORD = "list"; private static final String lineFormat = "%d: %s"; - private final ArrayList tasks; - - public ListCommand(ArrayList tasks) { - this.tasks = tasks; - } @Override public CommandResult execute() { @@ -17,6 +11,6 @@ public CommandResult execute() { } String userMessage = String.join("\n", lines); - return new CommandResult(userMessage, false); + return new CommandResult(userMessage, false, false); } } diff --git a/src/main/java/MarkCommand.java b/src/main/java/MarkCommand.java index f3e000cd5f..5dcafe79a7 100644 --- a/src/main/java/MarkCommand.java +++ b/src/main/java/MarkCommand.java @@ -1,24 +1,22 @@ -import java.util.ArrayList; - public class MarkCommand extends Command { + public static final String COMMAND_WORD = "mark"; private static final String userMessageFormat = "Marked task %d as done!\n %s"; private final int index; - private final Task task; - public MarkCommand(ArrayList tasks, String arguments) throws DukeException { - int i = Integer.parseInt(arguments); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - this.index = i; - // Subtract 1 to account for 0-index data structure. - this.task = tasks.get(this.index - 1); + public MarkCommand(String arguments) { + this.index = Integer.parseInt(arguments); } @Override - public CommandResult execute() { + public CommandResult execute() throws DukeException { + // Check if index is out of bounds. + if (this.index <= 0 || this.index > this.tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = this.tasks.get(this.index - 1); task.markAsDone(); - String userMessage = String.format(userMessageFormat, this.index, this.task); - return new CommandResult(userMessage, true); + String userMessage = String.format(userMessageFormat, this.index, task); + return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/Parser.java b/src/main/java/Parser.java new file mode 100644 index 0000000000..e15a1413d1 --- /dev/null +++ b/src/main/java/Parser.java @@ -0,0 +1,56 @@ +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class Parser { + private static final Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)\\s?(?.*)"); + private static final DukeException UNKNOWN_COMMAND = new DukeException("Unknown command!"); + + public Command parseCommand(String userInput) throws DukeException { + Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim()); + String commandWord, arguments; + if (matcher.matches()) { + commandWord = matcher.group("commandWord"); + arguments = matcher.group("arguments"); + } else { + throw Parser.UNKNOWN_COMMAND; + } + Command command; + + switch (commandWord) { + case ExitCommand.COMMAND_WORD: + command = new ExitCommand(); + break; + case ListCommand.COMMAND_WORD: + command = new ListCommand(); + break; + case MarkCommand.COMMAND_WORD: { + command = new MarkCommand(arguments); + break; + } + case UnmarkCommand.COMMAND_WORD: { + command = new UnmarkCommand(arguments); + break; + } + case DeleteCommand.COMMAND_WORD: { + command = new DeleteCommand(arguments); + break; + } + case TodoCommand.COMMAND_WORD: { + command = new TodoCommand(arguments); + break; + } + case DeadlineCommand.COMMAND_WORD: { + command = new DeadlineCommand(arguments); + break; + } + case EventCommand.COMMAND_WORD: { + command = new EventCommand(arguments); + break; + } + default: + throw Parser.UNKNOWN_COMMAND; + } + + return command; + } +} diff --git a/src/main/java/TodoCommand.java b/src/main/java/TodoCommand.java index 91c5e72f81..6b29a84987 100644 --- a/src/main/java/TodoCommand.java +++ b/src/main/java/TodoCommand.java @@ -1,16 +1,13 @@ -import java.util.ArrayList; - public class TodoCommand extends Command { + public static final String COMMAND_WORD = "todo"; private static final String userMessageFormat = "Added this todo!\n %s\nNow you have %d tasks."; - private final ArrayList tasks; private final Todo todo; - public TodoCommand(ArrayList tasks, String arguments) throws DukeException { + public TodoCommand(String arguments) throws DukeException { if (arguments.length() < 1) { throw Todo.emptyDescription; } - this.tasks = tasks; this.todo = new Todo(arguments); } @@ -19,6 +16,6 @@ public CommandResult execute() { this.tasks.add(this.todo); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.todo, numberOfTasks); - return new CommandResult(userMessage, true); + return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java index 901882819f..e733a3f9be 100644 --- a/src/main/java/Ui.java +++ b/src/main/java/Ui.java @@ -15,10 +15,6 @@ public void show(String... messages) { } } - public void showLineBreak() { - this.show(horizontalLine); - } - public void showWelcomeMessage() { this.show( horizontalLine, @@ -53,6 +49,6 @@ public void showErrorMessage(Exception exception) { } public void showResult(CommandResult result) { - this.show(result.getUserMessage()); + this.show(result.getUserMessage(), horizontalLine); } } diff --git a/src/main/java/UnmarkCommand.java b/src/main/java/UnmarkCommand.java index a7df24d1af..e8382fb6bd 100644 --- a/src/main/java/UnmarkCommand.java +++ b/src/main/java/UnmarkCommand.java @@ -1,24 +1,22 @@ -import java.util.ArrayList; - public class UnmarkCommand extends Command { + public static final String COMMAND_WORD = "unmark"; private static final String userMessageFormat = "Marked task %d as not done!\n %s"; private final int index; - private final Task task; - public UnmarkCommand(ArrayList tasks, String arguments) throws DukeException { - int i = Integer.parseInt(arguments); - if (i <= 0 || i > tasks.size()) { - throw DukeException.invalidIndex; - } - this.index = i; - // Subtract 1 to account for 0-index data structure. - this.task = tasks.get(this.index - 1); + public UnmarkCommand(String arguments) { + this.index = Integer.parseInt(arguments); } @Override - public CommandResult execute() { + public CommandResult execute() throws DukeException { + // Check if index is out of bounds. + if (this.index <= 0 || this.index > this.tasks.size()) { + throw DukeException.invalidIndex; + } + // Subtract 1 to account for 0-index data structure. + Task task = this.tasks.get(this.index - 1); task.markAsUndone(); - String userMessage = String.format(userMessageFormat, this.index, this.task); - return new CommandResult(userMessage, true); + String userMessage = String.format(userMessageFormat, this.index, task); + return new CommandResult(userMessage, true, false); } } From d2acc2feef9d83b4a5362242d86dfc1078066f40 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 14:35:05 +0800 Subject: [PATCH 32/65] Add TaskList class --- src/main/java/Command.java | 6 ++---- src/main/java/DeadlineCommand.java | 2 +- src/main/java/DeleteCommand.java | 4 ++-- src/main/java/Duke.java | 5 ++--- src/main/java/EventCommand.java | 2 +- src/main/java/ListCommand.java | 2 +- src/main/java/MarkCommand.java | 2 +- src/main/java/Storage.java | 12 ++++++------ src/main/java/TaskList.java | 25 +++++++++++++++++++++++++ src/main/java/TodoCommand.java | 2 +- src/main/java/UnmarkCommand.java | 2 +- 11 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 src/main/java/TaskList.java diff --git a/src/main/java/Command.java b/src/main/java/Command.java index f7952a5f84..bbe7c41c35 100644 --- a/src/main/java/Command.java +++ b/src/main/java/Command.java @@ -1,9 +1,7 @@ -import java.util.ArrayList; - public abstract class Command { - protected ArrayList tasks; + protected TaskList tasks; - protected void setData(ArrayList tasks) { + protected void setData(TaskList tasks) { this.tasks = tasks; } diff --git a/src/main/java/DeadlineCommand.java b/src/main/java/DeadlineCommand.java index e95f077110..89b3d84046 100644 --- a/src/main/java/DeadlineCommand.java +++ b/src/main/java/DeadlineCommand.java @@ -31,7 +31,7 @@ public DeadlineCommand(String arguments) throws DukeException { @Override public CommandResult execute() { - this.tasks.add(this.deadline); + this.tasks.addTask(this.deadline); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.deadline, numberOfTasks); return new CommandResult(userMessage, true, false); diff --git a/src/main/java/DeleteCommand.java b/src/main/java/DeleteCommand.java index 1d90afcb6a..4776b4ef06 100644 --- a/src/main/java/DeleteCommand.java +++ b/src/main/java/DeleteCommand.java @@ -14,8 +14,8 @@ public CommandResult execute() throws DukeException { throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.get(this.index - 1); - this.tasks.remove(this.index - 1); + Task task = this.tasks.getTask(this.index - 1); + this.tasks.removeTask(this.index - 1); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, task, numberOfTasks); return new CommandResult(userMessage, true, false); diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 3af623cf90..666588a8cc 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,5 +1,4 @@ import java.io.IOException; -import java.util.ArrayList; import java.util.Scanner; public class Duke { @@ -19,13 +18,13 @@ public static void main(String[] args) { Storage storage = new Storage("data", "data/tasks"); - ArrayList tasks; + TaskList tasks; try { tasks = storage.load(); } catch (DukeException e) { duke.ui.showErrorMessage(e); // Load with empty list instead. - tasks = new ArrayList<>(); + tasks = new TaskList(); } while (scanner.hasNext()) { diff --git a/src/main/java/EventCommand.java b/src/main/java/EventCommand.java index 5f8e3fd702..5d3367fd75 100644 --- a/src/main/java/EventCommand.java +++ b/src/main/java/EventCommand.java @@ -31,7 +31,7 @@ public EventCommand(String arguments) throws DukeException { @Override public CommandResult execute() { - this.tasks.add(this.event); + this.tasks.addTask(this.event); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.event, numberOfTasks); return new CommandResult(userMessage, true, false); diff --git a/src/main/java/ListCommand.java b/src/main/java/ListCommand.java index a525e8db09..596e1c50a8 100644 --- a/src/main/java/ListCommand.java +++ b/src/main/java/ListCommand.java @@ -7,7 +7,7 @@ public CommandResult execute() { String[] lines = new String[this.tasks.size()]; for (int i = 0; i < tasks.size(); i++) { - lines[i] = String.format(lineFormat, i + 1, this.tasks.get(i)); + lines[i] = String.format(lineFormat, i + 1, this.tasks.getTask(i)); } String userMessage = String.join("\n", lines); diff --git a/src/main/java/MarkCommand.java b/src/main/java/MarkCommand.java index 5dcafe79a7..0fa7a932d6 100644 --- a/src/main/java/MarkCommand.java +++ b/src/main/java/MarkCommand.java @@ -14,7 +14,7 @@ public CommandResult execute() throws DukeException { throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.get(this.index - 1); + Task task = this.tasks.getTask(this.index - 1); task.markAsDone(); String userMessage = String.format(userMessageFormat, this.index, task); return new CommandResult(userMessage, true, false); diff --git a/src/main/java/Storage.java b/src/main/java/Storage.java index 165fd5cb67..7eb51d6c2e 100644 --- a/src/main/java/Storage.java +++ b/src/main/java/Storage.java @@ -4,7 +4,6 @@ import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; -import java.util.ArrayList; import java.util.Scanner; public class Storage { @@ -21,7 +20,7 @@ public Storage(String directoryPath, String filePath) { * * @return The tasks loaded from the file. */ - public ArrayList load() throws DukeException { + public TaskList load() throws DukeException { Path directoryPath = Paths.get(this.directoryPath); Path filePath = Paths.get(this.filePath); File directory = new File(directoryPath.toUri()); @@ -30,7 +29,7 @@ public ArrayList load() throws DukeException { directory.mkdir(); File file = new File(filePath.toUri()); - ArrayList tasks = new ArrayList<>(); + TaskList tasks = new TaskList(); try { // Create file if it does not exist. if (file.createNewFile()) { @@ -60,7 +59,7 @@ public ArrayList load() throws DukeException { throw DukeException.badData; } - tasks.add(task); + tasks.addTask(task); } } catch (FileNotFoundException e) { // Should not happen because file is created beforehand. @@ -75,12 +74,13 @@ public ArrayList load() throws DukeException { * * @param tasks The tasks to be saved to the file. */ - public void save(ArrayList tasks) throws IOException { + public void save(TaskList tasks) throws IOException { Path filePath = Paths.get(this.filePath); File file = new File(filePath.toUri()); FileWriter fw = new FileWriter(file); - for (Task task : tasks) { + for (int i = 0; i < tasks.size(); i++) { + Task task = tasks.getTask(i); String line = task.getFileFormat(); fw.write(line + "\n"); } diff --git a/src/main/java/TaskList.java b/src/main/java/TaskList.java new file mode 100644 index 0000000000..0c78f0712b --- /dev/null +++ b/src/main/java/TaskList.java @@ -0,0 +1,25 @@ +import java.util.ArrayList; + +public class TaskList { + private final ArrayList tasks; + + public TaskList() { + this.tasks = new ArrayList<>(); + } + + public void addTask(Task task) { + this.tasks.add(task); + } + + public void removeTask(int index) { + this.tasks.remove(index); + } + + public Task getTask(int index) { + return this.tasks.get(index); + } + + public int size() { + return this.tasks.size(); + } +} diff --git a/src/main/java/TodoCommand.java b/src/main/java/TodoCommand.java index 6b29a84987..abe004db58 100644 --- a/src/main/java/TodoCommand.java +++ b/src/main/java/TodoCommand.java @@ -13,7 +13,7 @@ public TodoCommand(String arguments) throws DukeException { @Override public CommandResult execute() { - this.tasks.add(this.todo); + this.tasks.addTask(this.todo); int numberOfTasks = this.tasks.size(); String userMessage = String.format(userMessageFormat, this.todo, numberOfTasks); return new CommandResult(userMessage, true, false); diff --git a/src/main/java/UnmarkCommand.java b/src/main/java/UnmarkCommand.java index e8382fb6bd..70874a220e 100644 --- a/src/main/java/UnmarkCommand.java +++ b/src/main/java/UnmarkCommand.java @@ -14,7 +14,7 @@ public CommandResult execute() throws DukeException { throw DukeException.invalidIndex; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.get(this.index - 1); + Task task = this.tasks.getTask(this.index - 1); task.markAsUndone(); String userMessage = String.format(userMessageFormat, this.index, task); return new CommandResult(userMessage, true, false); From fac6452bffc2b149fe7a6238b3705920c5cff625 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 14:45:17 +0800 Subject: [PATCH 33/65] Reorganise Duke class --- src/main/java/Duke.java | 49 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 666588a8cc..2830fc81af 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -2,57 +2,62 @@ import java.util.Scanner; public class Duke { - private final Ui ui; private final Parser parser; + private final Storage storage; + private final Ui ui; + private final TaskList tasks; public Duke() { - this.ui = new Ui(); this.parser = new Parser(); - } - - public static void main(String[] args) { - Duke duke = new Duke(); - duke.ui.showWelcomeMessage(); - - Scanner scanner = new Scanner(System.in); - - Storage storage = new Storage("data", "data/tasks"); + this.storage = new Storage("data", "data/tasks"); + this.ui = new Ui(); TaskList tasks; try { - tasks = storage.load(); + // Attempt to load tasks from storage. + tasks = this.storage.load(); } catch (DukeException e) { - duke.ui.showErrorMessage(e); - // Load with empty list instead. + this.ui.showErrorMessage(e); + // Load empty list if fail to load from storage. tasks = new TaskList(); } + this.tasks = tasks; + } + + public void run() { + Scanner scanner = new Scanner(System.in); + this.ui.showWelcomeMessage(); while (scanner.hasNext()) { try { String userInput = scanner.nextLine(); - Command command = duke.parser.parseCommand(userInput); + Command command = this.parser.parseCommand(userInput); // Populate command with tasks. - command.setData(tasks); + command.setData(this.tasks); CommandResult result = command.execute(); if (result.shouldExit()) { // Exit application by exiting the scan loop. break; } if (result.shouldUpdateFile()) { - storage.save(tasks); + // Save to storage. + this.storage.save(this.tasks); } - duke.ui.showResult(result); + this.ui.showResult(result); } catch (DukeException | IOException e) { - duke.ui.showErrorMessage(e); + this.ui.showErrorMessage(e); } catch (NumberFormatException e) { // Handles case where user inputs an invalid number. - duke.ui.showErrorMessage("Invalid number!"); + this.ui.showErrorMessage("Invalid number!"); } } - duke.ui.showGoodbyeMessage(); - + this.ui.showGoodbyeMessage(); // Close scanner. scanner.close(); } + + public static void main(String[] args) { + new Duke().run(); + } } From af2fddedcfe79e7296b80e4cf1144e928ca5f42c Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 15:09:05 +0800 Subject: [PATCH 34/65] Divide classes into packages --- src/main/java/{ => duke}/Duke.java | 10 ++++++++++ src/main/java/{ => duke/commands}/Command.java | 7 ++++++- .../java/{ => duke/commands}/CommandResult.java | 2 ++ .../java/{ => duke/commands}/DeadlineCommand.java | 5 +++++ .../java/{ => duke/commands}/DeleteCommand.java | 5 +++++ src/main/java/{ => duke/commands}/EventCommand.java | 5 +++++ src/main/java/{ => duke/commands}/ExitCommand.java | 2 ++ src/main/java/{ => duke/commands}/ListCommand.java | 2 ++ src/main/java/{ => duke/commands}/MarkCommand.java | 5 +++++ src/main/java/{ => duke/commands}/TodoCommand.java | 5 +++++ .../java/{ => duke/commands}/UnmarkCommand.java | 5 +++++ .../java/{ => duke/exceptions}/DukeException.java | 2 ++ src/main/java/{ => duke/parser}/Parser.java | 13 +++++++++++++ src/main/java/{ => duke/storage}/Storage.java | 9 +++++++++ src/main/java/{ => duke/task}/Deadline.java | 4 ++++ src/main/java/{ => duke/task}/Event.java | 4 ++++ src/main/java/{ => duke/task}/Task.java | 2 ++ src/main/java/{ => duke/task}/TaskList.java | 2 ++ src/main/java/{ => duke/task}/Todo.java | 4 ++++ src/main/java/{ => duke/ui}/Ui.java | 4 ++++ text-ui-test/runtest.sh | 2 +- 21 files changed, 97 insertions(+), 2 deletions(-) rename src/main/java/{ => duke}/Duke.java (89%) rename src/main/java/{ => duke/commands}/Command.java (55%) rename src/main/java/{ => duke/commands}/CommandResult.java (95%) rename src/main/java/{ => duke/commands}/DeadlineCommand.java (94%) rename src/main/java/{ => duke/commands}/DeleteCommand.java (91%) rename src/main/java/{ => duke/commands}/EventCommand.java (94%) rename src/main/java/{ => duke/commands}/ExitCommand.java (88%) rename src/main/java/{ => duke/commands}/ListCommand.java (95%) rename src/main/java/{ => duke/commands}/MarkCommand.java (90%) rename src/main/java/{ => duke/commands}/TodoCommand.java (89%) rename src/main/java/{ => duke/commands}/UnmarkCommand.java (90%) rename src/main/java/{ => duke/exceptions}/DukeException.java (95%) rename src/main/java/{ => duke/parser}/Parser.java (83%) rename src/main/java/{ => duke/storage}/Storage.java (93%) rename src/main/java/{ => duke/task}/Deadline.java (97%) rename src/main/java/{ => duke/task}/Event.java (97%) rename src/main/java/{ => duke/task}/Task.java (98%) rename src/main/java/{ => duke/task}/TaskList.java (95%) rename src/main/java/{ => duke/task}/Todo.java (95%) rename src/main/java/{ => duke/ui}/Ui.java (96%) diff --git a/src/main/java/Duke.java b/src/main/java/duke/Duke.java similarity index 89% rename from src/main/java/Duke.java rename to src/main/java/duke/Duke.java index 2830fc81af..22743fa353 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/duke/Duke.java @@ -1,3 +1,13 @@ +package duke; + +import duke.commands.Command; +import duke.commands.CommandResult; +import duke.exceptions.DukeException; +import duke.task.TaskList; +import duke.parser.Parser; +import duke.storage.Storage; +import duke.ui.Ui; + import java.io.IOException; import java.util.Scanner; diff --git a/src/main/java/Command.java b/src/main/java/duke/commands/Command.java similarity index 55% rename from src/main/java/Command.java rename to src/main/java/duke/commands/Command.java index bbe7c41c35..ff6b612fc7 100644 --- a/src/main/java/Command.java +++ b/src/main/java/duke/commands/Command.java @@ -1,7 +1,12 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.TaskList; + public abstract class Command { protected TaskList tasks; - protected void setData(TaskList tasks) { + public void setData(TaskList tasks) { this.tasks = tasks; } diff --git a/src/main/java/CommandResult.java b/src/main/java/duke/commands/CommandResult.java similarity index 95% rename from src/main/java/CommandResult.java rename to src/main/java/duke/commands/CommandResult.java index 6ffb5a5a3c..0982e8342b 100644 --- a/src/main/java/CommandResult.java +++ b/src/main/java/duke/commands/CommandResult.java @@ -1,3 +1,5 @@ +package duke.commands; + public class CommandResult { private final String userMessage; private final boolean hasUpdates; diff --git a/src/main/java/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java similarity index 94% rename from src/main/java/DeadlineCommand.java rename to src/main/java/duke/commands/DeadlineCommand.java index 89b3d84046..95ed90bd39 100644 --- a/src/main/java/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Deadline; + import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; diff --git a/src/main/java/DeleteCommand.java b/src/main/java/duke/commands/DeleteCommand.java similarity index 91% rename from src/main/java/DeleteCommand.java rename to src/main/java/duke/commands/DeleteCommand.java index 4776b4ef06..4ed0c04673 100644 --- a/src/main/java/DeleteCommand.java +++ b/src/main/java/duke/commands/DeleteCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Task; + public class DeleteCommand extends Command { public static final String COMMAND_WORD = "delete"; private static final String userMessageFormat = "Removing this task!\n %s\nNow you have %d tasks left."; diff --git a/src/main/java/EventCommand.java b/src/main/java/duke/commands/EventCommand.java similarity index 94% rename from src/main/java/EventCommand.java rename to src/main/java/duke/commands/EventCommand.java index 5d3367fd75..2fe8c0f509 100644 --- a/src/main/java/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Event; + import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; diff --git a/src/main/java/ExitCommand.java b/src/main/java/duke/commands/ExitCommand.java similarity index 88% rename from src/main/java/ExitCommand.java rename to src/main/java/duke/commands/ExitCommand.java index e9dde83c34..052f11d095 100644 --- a/src/main/java/ExitCommand.java +++ b/src/main/java/duke/commands/ExitCommand.java @@ -1,3 +1,5 @@ +package duke.commands; + public class ExitCommand extends Command { public static final String COMMAND_WORD = "bye"; diff --git a/src/main/java/ListCommand.java b/src/main/java/duke/commands/ListCommand.java similarity index 95% rename from src/main/java/ListCommand.java rename to src/main/java/duke/commands/ListCommand.java index 596e1c50a8..2ef9d54c27 100644 --- a/src/main/java/ListCommand.java +++ b/src/main/java/duke/commands/ListCommand.java @@ -1,3 +1,5 @@ +package duke.commands; + public class ListCommand extends Command { public static final String COMMAND_WORD = "list"; private static final String lineFormat = "%d: %s"; diff --git a/src/main/java/MarkCommand.java b/src/main/java/duke/commands/MarkCommand.java similarity index 90% rename from src/main/java/MarkCommand.java rename to src/main/java/duke/commands/MarkCommand.java index 0fa7a932d6..a88b286f28 100644 --- a/src/main/java/MarkCommand.java +++ b/src/main/java/duke/commands/MarkCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Task; + public class MarkCommand extends Command { public static final String COMMAND_WORD = "mark"; private static final String userMessageFormat = "Marked task %d as done!\n %s"; diff --git a/src/main/java/TodoCommand.java b/src/main/java/duke/commands/TodoCommand.java similarity index 89% rename from src/main/java/TodoCommand.java rename to src/main/java/duke/commands/TodoCommand.java index abe004db58..0eeb9f92c0 100644 --- a/src/main/java/TodoCommand.java +++ b/src/main/java/duke/commands/TodoCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Todo; + public class TodoCommand extends Command { public static final String COMMAND_WORD = "todo"; private static final String userMessageFormat = "Added this todo!\n %s\nNow you have %d tasks."; diff --git a/src/main/java/UnmarkCommand.java b/src/main/java/duke/commands/UnmarkCommand.java similarity index 90% rename from src/main/java/UnmarkCommand.java rename to src/main/java/duke/commands/UnmarkCommand.java index 70874a220e..6f6332ecaa 100644 --- a/src/main/java/UnmarkCommand.java +++ b/src/main/java/duke/commands/UnmarkCommand.java @@ -1,3 +1,8 @@ +package duke.commands; + +import duke.exceptions.DukeException; +import duke.task.Task; + public class UnmarkCommand extends Command { public static final String COMMAND_WORD = "unmark"; private static final String userMessageFormat = "Marked task %d as not done!\n %s"; diff --git a/src/main/java/DukeException.java b/src/main/java/duke/exceptions/DukeException.java similarity index 95% rename from src/main/java/DukeException.java rename to src/main/java/duke/exceptions/DukeException.java index 454a0e3d4a..ce71e7fdfc 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/duke/exceptions/DukeException.java @@ -1,3 +1,5 @@ +package duke.exceptions; + /** * Exception for the Duke application. */ diff --git a/src/main/java/Parser.java b/src/main/java/duke/parser/Parser.java similarity index 83% rename from src/main/java/Parser.java rename to src/main/java/duke/parser/Parser.java index e15a1413d1..f15c3ad2ec 100644 --- a/src/main/java/Parser.java +++ b/src/main/java/duke/parser/Parser.java @@ -1,3 +1,16 @@ +package duke.parser; + +import duke.commands.Command; +import duke.commands.ExitCommand; +import duke.commands.ListCommand; +import duke.commands.MarkCommand; +import duke.commands.UnmarkCommand; +import duke.commands.DeleteCommand; +import duke.commands.TodoCommand; +import duke.commands.DeadlineCommand; +import duke.commands.EventCommand; +import duke.exceptions.DukeException; + import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/src/main/java/Storage.java b/src/main/java/duke/storage/Storage.java similarity index 93% rename from src/main/java/Storage.java rename to src/main/java/duke/storage/Storage.java index 7eb51d6c2e..c18cab329b 100644 --- a/src/main/java/Storage.java +++ b/src/main/java/duke/storage/Storage.java @@ -1,3 +1,12 @@ +package duke.storage; + +import duke.exceptions.DukeException; +import duke.task.TaskList; +import duke.task.Task; +import duke.task.Todo; +import duke.task.Deadline; +import duke.task.Event; + import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; diff --git a/src/main/java/Deadline.java b/src/main/java/duke/task/Deadline.java similarity index 97% rename from src/main/java/Deadline.java rename to src/main/java/duke/task/Deadline.java index eda5b4e01c..f8ba59e7c2 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -1,3 +1,7 @@ +package duke.task; + +import duke.exceptions.DukeException; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/Event.java b/src/main/java/duke/task/Event.java similarity index 97% rename from src/main/java/Event.java rename to src/main/java/duke/task/Event.java index 68fa1776c3..ebb8dd1c58 100644 --- a/src/main/java/Event.java +++ b/src/main/java/duke/task/Event.java @@ -1,3 +1,7 @@ +package duke.task; + +import duke.exceptions.DukeException; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/Task.java b/src/main/java/duke/task/Task.java similarity index 98% rename from src/main/java/Task.java rename to src/main/java/duke/task/Task.java index f92893dd37..03af779e86 100644 --- a/src/main/java/Task.java +++ b/src/main/java/duke/task/Task.java @@ -1,3 +1,5 @@ +package duke.task; + /** * Task is a representation of a task in Duke. */ diff --git a/src/main/java/TaskList.java b/src/main/java/duke/task/TaskList.java similarity index 95% rename from src/main/java/TaskList.java rename to src/main/java/duke/task/TaskList.java index 0c78f0712b..791e109cb7 100644 --- a/src/main/java/TaskList.java +++ b/src/main/java/duke/task/TaskList.java @@ -1,3 +1,5 @@ +package duke.task; + import java.util.ArrayList; public class TaskList { diff --git a/src/main/java/Todo.java b/src/main/java/duke/task/Todo.java similarity index 95% rename from src/main/java/Todo.java rename to src/main/java/duke/task/Todo.java index b4c0818d20..cecf919e3b 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -1,3 +1,7 @@ +package duke.task; + +import duke.exceptions.DukeException; + /** * Todo is a Task without any date/time attached to it. */ diff --git a/src/main/java/Ui.java b/src/main/java/duke/ui/Ui.java similarity index 96% rename from src/main/java/Ui.java rename to src/main/java/duke/ui/Ui.java index e733a3f9be..a6f5570a85 100644 --- a/src/main/java/Ui.java +++ b/src/main/java/duke/ui/Ui.java @@ -1,3 +1,7 @@ +package duke.ui; + +import duke.commands.CommandResult; + public class Ui { private static final String indentation = " "; private static final String horizontalLine = "____________________________________________________________"; diff --git a/text-ui-test/runtest.sh b/text-ui-test/runtest.sh index 3517a4ee18..0a1ff2cf41 100644 --- a/text-ui-test/runtest.sh +++ b/text-ui-test/runtest.sh @@ -13,7 +13,7 @@ then fi # compile the code into the bin folder, terminates if error occurred -if ! javac -cp ../src/main/java -Xlint:none -d ../bin ../src/main/java/*.java +if ! javac -cp ../src/main/java -Xlint:none -d ../bin ../src/main/java/**/*.java then echo "********** BUILD FAILURE **********" exit 1 From c5c532762524432726bfded277def992aa4a1d82 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 20 Aug 2022 15:52:41 +0800 Subject: [PATCH 35/65] Add Gradle for build, run, test --- build.gradle | 28 +++ gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59821 bytes gradle/wrapper/gradle-wrapper.properties | 5 + gradlew | 234 +++++++++++++++++++++++ gradlew.bat | 89 +++++++++ 5 files changed, 356 insertions(+) create mode 100644 build.gradle create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..2678645602 --- /dev/null +++ b/build.gradle @@ -0,0 +1,28 @@ +plugins { + id 'java' + id 'application' +} + +group 'org.example' +version '1.0-SNAPSHOT' + +repositories { + mavenCentral() +} + +application { + mainClassName = "duke.Duke" +} + +run { + standardInput = System.in +} + +test { + useJUnitPlatform() +} + +dependencies { + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.0' + testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.0' +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..41d9927a4d4fb3f96a785543079b8df6723c946b GIT binary patch literal 59821 zcma&NV|1p`(k7gaZQHhOJ9%QKV?D8LCmq{1JGRYE(y=?XJw0>InKkE~^UnAEs2gk5 zUVGPCwX3dOb!}xiFmPB95NK!+5D<~S0s;d1zn&lrfAn7 zC?Nb-LFlib|DTEqB8oDS5&$(u1<5;wsY!V`2F7^=IR@I9so5q~=3i_(hqqG<9SbL8Q(LqDrz+aNtGYWGJ2;p*{a-^;C>BfGzkz_@fPsK8{pTT~_VzB$E`P@> z7+V1WF2+tSW=`ZRj3&0m&d#x_lfXq`bb-Y-SC-O{dkN2EVM7@!n|{s+2=xSEMtW7( zz~A!cBpDMpQu{FP=y;sO4Le}Z)I$wuFwpugEY3vEGfVAHGqZ-<{vaMv-5_^uO%a{n zE_Zw46^M|0*dZ`;t%^3C19hr=8FvVdDp1>SY>KvG!UfD`O_@weQH~;~W=fXK_!Yc> z`EY^PDJ&C&7LC;CgQJeXH2 zjfM}2(1i5Syj)Jj4EaRyiIl#@&lC5xD{8hS4Wko7>J)6AYPC-(ROpVE-;|Z&u(o=X z2j!*>XJ|>Lo+8T?PQm;SH_St1wxQPz)b)Z^C(KDEN$|-6{A>P7r4J1R-=R7|FX*@! zmA{Ja?XE;AvisJy6;cr9Q5ovphdXR{gE_7EF`ji;n|RokAJ30Zo5;|v!xtJr+}qbW zY!NI6_Wk#6pWFX~t$rAUWi?bAOv-oL6N#1>C~S|7_e4 zF}b9(&a*gHk+4@J26&xpiWYf2HN>P;4p|TD4f586umA2t@cO1=Fx+qd@1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Jv&(7Xjvm>$TIg2ZC&+^j(gT0R|&4cb)=92-2Hti1`& z=+M;*O%_j3>9zW|3h{0Tfh5i)Fa;clGNJpPRcUmgErzC{B+zACiPHbff3SmsCZ&X; zp=tgI=zW-t(5sXFL8;ITHw0?5FL3+*z5F-KcLN130l=jAU6%F=DClRPrzO|zY+HD`zlZ-)JT}X?2g!o zxg4Ld-mx6&*-N0-MQ(z+zJo8c`B39gf{-h2vqH<=^T&o1Dgd>4BnVht+JwLcrjJl1 zsP!8`>3-rSls07q2i1hScM&x0lQyBbk(U=#3hI7Bkh*kj6H*&^p+J?OMiT_3*vw5R zEl&p|QQHZq6f~TlAeDGy(^BC0vUK?V&#ezC0*#R-h}_8Cw8-*${mVfHssathC8%VA zUE^Qd!;Rvym%|f@?-!sEj|73Vg8!$$zj_QBZAOraF5HCFKl=(Ac|_p%-P;6z<2WSf zz(9jF2x7ZR{w+p)ETCW06PVt0YnZ>gW9^sr&~`%a_7j-Ful~*4=o|&TM@k@Px2z>^ t{*Ed16F~3V5p+(suF-++X8+nHtT~NSfJ>UC3v)>lEpV}<+rIR_{{yMcG_L>v literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..41dfb87909 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000000..1b6c787337 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${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 "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java 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" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000000..ac1b06f938 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@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 execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' 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 execute + +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 + +:execute +@rem Setup the 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 %* + +: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 From 2d61563bed584567f2807ea58ebccd5090c84691 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 11:58:08 +0800 Subject: [PATCH 36/65] Add some JUnit tests --- src/test/java/duke/parser/ParserTest.java | 103 ++++++++++++++++++++ src/test/java/duke/storage/StorageTest.java | 25 +++++ src/test/java/duke/task/DeadlineTest.java | 45 +++++++++ src/test/java/duke/task/EventTest.java | 45 +++++++++ src/test/java/duke/task/TodoTest.java | 45 +++++++++ 5 files changed, 263 insertions(+) create mode 100644 src/test/java/duke/parser/ParserTest.java create mode 100644 src/test/java/duke/storage/StorageTest.java create mode 100644 src/test/java/duke/task/DeadlineTest.java create mode 100644 src/test/java/duke/task/EventTest.java create mode 100644 src/test/java/duke/task/TodoTest.java diff --git a/src/test/java/duke/parser/ParserTest.java b/src/test/java/duke/parser/ParserTest.java new file mode 100644 index 0000000000..efc4455327 --- /dev/null +++ b/src/test/java/duke/parser/ParserTest.java @@ -0,0 +1,103 @@ +package duke.parser; + +import duke.commands.Command; +import duke.commands.ExitCommand; +import duke.commands.ListCommand; +import duke.commands.MarkCommand; +import duke.commands.UnmarkCommand; +import duke.commands.DeleteCommand; +import duke.commands.TodoCommand; +import duke.commands.DeadlineCommand; +import duke.commands.EventCommand; +import duke.exceptions.DukeException; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public class ParserTest { + @Test + public void parseCommand_exitCommand_parsedCorrectly() { + parseCommandAndAssert("bye", ExitCommand.class); + } + + @Test + public void parseCommand_listCommand_parsedCorrectly() { + parseCommandAndAssert("list", ListCommand.class); + } + + @Test + public void parseCommand_markCommand_parsedCorrectly() { + parseCommandAndAssert("mark 1", MarkCommand.class); + } + + @Test + public void parseCommand_unmarkCommand_parsedCorrectly() { + parseCommandAndAssert("unmark 1", UnmarkCommand.class); + } + + @Test + public void parseCommand_deleteCommand_parsedCorrectly() { + parseCommandAndAssert("delete 1", DeleteCommand.class); + } + + @Test + public void parseCommand_todoCommand_parsedCorrectly() { + parseCommandAndAssert("todo abc", TodoCommand.class); + } + + @Test + public void parseCommand_deadlineCommand_parsedCorrectly() { + parseCommandAndAssert("deadline abc /by 2100-01-01", DeadlineCommand.class); + } + + @Test + public void parseCommand_deadlineCommandMissingDate_errorMessage() { + parseCommandAndExpectException("deadline abc", DukeException.class); + } + + @Test + public void parseCommand_eventCommand_parsedCorrectly() { + parseCommandAndAssert("event abc /at 2100-01-01", EventCommand.class); + } + + @Test + public void parseCommand_eventCommandMissingDate_errorMessage() { + parseCommandAndExpectException("event abc", DukeException.class); + } + + @Test + public void parseCommand_invalidCommand_errorMessage() { + parseCommandAndExpectException("invalidcommand", DukeException.class); + } + + /** + * Checks that parseCommand returns the correct class for a particular input. + * + * @param userInput Input to be tested for. + * @param expectedClass The expected class to be returned. + * @param The type of command. + */ + public void parseCommandAndAssert(String userInput, Class expectedClass) { + Parser parser = new Parser(); + assertDoesNotThrow(() -> { + Command command = parser.parseCommand(userInput); + // Ensures that command is the correct command. + assertTrue(command.getClass().isAssignableFrom(expectedClass)); + }); + } + + /** + * Checks that parseCommand throws an exception for a particular input. + * + * @param userInput Input to be tested for. + * @param expectedException The expected exception to be returned. + * @param The type of command. + */ + public void parseCommandAndExpectException(String userInput, Class expectedException) { + Parser parser = new Parser(); + // Ensures that exception thrown is the correct. + assertThrows(expectedException, () -> parser.parseCommand(userInput)); + } +} diff --git a/src/test/java/duke/storage/StorageTest.java b/src/test/java/duke/storage/StorageTest.java new file mode 100644 index 0000000000..20b3820c3e --- /dev/null +++ b/src/test/java/duke/storage/StorageTest.java @@ -0,0 +1,25 @@ +package duke.storage; + +import duke.task.TaskList; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; + +public class StorageTest { + private static final String directoryPath = "data"; + private static final String filePath = "data/tasks"; + + @Test + public void load_loadTasks_noException() { + Storage storage = new Storage(directoryPath, filePath); + assertDoesNotThrow(() -> { + storage.load(); + }); + } + + @Test + public void save_saveTasks_noException() { + Storage storage = new Storage(directoryPath, filePath); + assertDoesNotThrow(() -> storage.save(new TaskList())); + } +} diff --git a/src/test/java/duke/task/DeadlineTest.java b/src/test/java/duke/task/DeadlineTest.java new file mode 100644 index 0000000000..3e632ea7b9 --- /dev/null +++ b/src/test/java/duke/task/DeadlineTest.java @@ -0,0 +1,45 @@ +package duke.task; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class DeadlineTest { + @Test + public void create_notDoneString_createdCorrectly() { + Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); + assertEquals("[D][ ] abc (by: 01 Jan 40)", deadline.toString()); + } + + @Test + public void create_doneString_createdCorrectly() { + Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); + assertEquals("[D][X] abc (by: 01 Jan 40)", deadline.toString()); + } + + @Test + public void fileFormat_notDone_formattedCorrectly() { + Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); + assertEquals("D | 0 | abc | 2040-01-01", deadline.getFileFormat()); + } + + @Test + public void fileFormat_done_formattedCorrectly() { + Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); + assertEquals("D | 1 | abc | 2040-01-01", deadline.getFileFormat()); + } + + @Test + public void markAsDone_done_changedCorrectly() { + Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); + deadline.markAsDone(); + assertEquals("[D][X] abc (by: 01 Jan 40)", deadline.toString()); + } + + @Test + public void markAsUndone_undone_changedCorrectly() { + Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); + deadline.markAsUndone(); + assertEquals("[D][ ] abc (by: 01 Jan 40)", deadline.toString()); + } +} diff --git a/src/test/java/duke/task/EventTest.java b/src/test/java/duke/task/EventTest.java new file mode 100644 index 0000000000..1bdac48741 --- /dev/null +++ b/src/test/java/duke/task/EventTest.java @@ -0,0 +1,45 @@ +package duke.task; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class EventTest { + @Test + public void create_notDoneString_createdCorrectly() { + Event event = Event.create("0", "abc", "2040-01-01"); + assertEquals("[E][ ] abc (at: 01 Jan 40)", event.toString()); + } + + @Test + public void create_doneString_createdCorrectly() { + Event event = Event.create("1", "abc", "2040-01-01"); + assertEquals("[E][X] abc (at: 01 Jan 40)", event.toString()); + } + + @Test + public void fileFormat_notDone_formattedCorrectly() { + Event event = Event.create("0", "abc", "2040-01-01"); + assertEquals("E | 0 | abc | 2040-01-01", event.getFileFormat()); + } + + @Test + public void fileFormat_done_formattedCorrectly() { + Event event = Event.create("1", "abc", "2040-01-01"); + assertEquals("E | 1 | abc | 2040-01-01", event.getFileFormat()); + } + + @Test + public void markAsDone_done_changedCorrectly() { + Event event = Event.create("0", "abc", "2040-01-01"); + event.markAsDone(); + assertEquals("[E][X] abc (at: 01 Jan 40)", event.toString()); + } + + @Test + public void markAsUndone_undone_changedCorrectly() { + Event event = Event.create("1", "abc", "2040-01-01"); + event.markAsUndone(); + assertEquals("[E][ ] abc (at: 01 Jan 40)", event.toString()); + } +} diff --git a/src/test/java/duke/task/TodoTest.java b/src/test/java/duke/task/TodoTest.java new file mode 100644 index 0000000000..24217c30db --- /dev/null +++ b/src/test/java/duke/task/TodoTest.java @@ -0,0 +1,45 @@ +package duke.task; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class TodoTest { + @Test + public void create_notDoneString_createdCorrectly() { + Todo todo = Todo.create("0", "abc"); + assertEquals("[T][ ] abc", todo.toString()); + } + + @Test + public void create_doneString_createdCorrectly() { + Todo todo = Todo.create("1", "abc"); + assertEquals("[T][X] abc", todo.toString()); + } + + @Test + public void fileFormat_notDone_formattedCorrectly() { + Todo todo = Todo.create("0", "abc"); + assertEquals("T | 0 | abc", todo.getFileFormat()); + } + + @Test + public void fileFormat_done_formattedCorrectly() { + Todo todo = Todo.create("1", "abc"); + assertEquals("T | 1 | abc", todo.getFileFormat()); + } + + @Test + public void markAsDone_done_changedCorrectly() { + Todo todo = Todo.create("0", "abc"); + todo.markAsDone(); + assertEquals("[T][X] abc", todo.toString()); + } + + @Test + public void markAsUndone_undone_changedCorrectly() { + Todo todo = Todo.create("1", "abc"); + todo.markAsUndone(); + assertEquals("[T][ ] abc", todo.toString()); + } +} From 0fba36dbaf75813465223f861bdcc2b37e0b304c Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 12:15:06 +0800 Subject: [PATCH 37/65] Add shadowjar plugin to Gradle --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 2678645602..2a5805f1b5 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' id 'application' + id "com.github.johnrengelman.shadow" version "7.1.2" } group 'org.example' @@ -14,6 +15,19 @@ application { mainClassName = "duke.Duke" } +jar { + manifest { + attributes 'Class-Path': 'duke.Duke' + } +} + +// Sets the name of the 'jar' file produced. +shadowJar { + archiveBaseName.set('duke') + archiveClassifier.set('') + archiveVersion.set('') +} + run { standardInput = System.in } From 2daf64716d6a7baf55934962cd12429eedcf4f41 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 14:02:34 +0800 Subject: [PATCH 38/65] Add JavaDoc comments --- src/main/java/duke/Duke.java | 15 +++++++++++ src/main/java/duke/commands/Command.java | 14 ++++++++++ .../java/duke/commands/CommandResult.java | 25 +++++++++++++++++ .../java/duke/commands/DeadlineCommand.java | 15 +++++++++++ .../java/duke/commands/DeleteCommand.java | 15 +++++++++++ src/main/java/duke/commands/EventCommand.java | 15 +++++++++++ src/main/java/duke/commands/ExitCommand.java | 9 +++++++ src/main/java/duke/commands/ListCommand.java | 9 +++++++ src/main/java/duke/commands/MarkCommand.java | 15 +++++++++++ src/main/java/duke/commands/TodoCommand.java | 15 +++++++++++ .../java/duke/commands/UnmarkCommand.java | 14 ++++++++++ .../java/duke/exceptions/DukeException.java | 8 +++--- src/main/java/duke/parser/Parser.java | 10 +++++++ src/main/java/duke/storage/Storage.java | 14 +++++++++- src/main/java/duke/task/Deadline.java | 19 ++++++------- src/main/java/duke/task/Event.java | 19 ++++++------- src/main/java/duke/task/Task.java | 6 ++--- src/main/java/duke/task/TaskList.java | 27 +++++++++++++++++++ src/main/java/duke/task/Todo.java | 17 ++++++------ 19 files changed, 248 insertions(+), 33 deletions(-) diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index 22743fa353..47bcf567e6 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -11,12 +11,19 @@ import java.io.IOException; import java.util.Scanner; +/** + * Main entry point of the Duke application. + * Initializes the application and is responsible for user interaction. + */ public class Duke { private final Parser parser; private final Storage storage; private final Ui ui; private final TaskList tasks; + /** + * Constructor for a Duke application instance. + */ public Duke() { this.parser = new Parser(); this.storage = new Storage("data", "data/tasks"); @@ -34,6 +41,9 @@ public Duke() { this.tasks = tasks; } + /** + * Runs the Duke application and handles user interaction. + */ public void run() { Scanner scanner = new Scanner(System.in); this.ui.showWelcomeMessage(); @@ -67,6 +77,11 @@ public void run() { scanner.close(); } + /** + * Entry point of the application. + * + * @param args Args is ignored. + */ public static void main(String[] args) { new Duke().run(); } diff --git a/src/main/java/duke/commands/Command.java b/src/main/java/duke/commands/Command.java index ff6b612fc7..e1e53105f8 100644 --- a/src/main/java/duke/commands/Command.java +++ b/src/main/java/duke/commands/Command.java @@ -3,12 +3,26 @@ import duke.exceptions.DukeException; import duke.task.TaskList; +/** + * Represents a command in the Duke application. + */ public abstract class Command { protected TaskList tasks; + /** + * Sets the data for the command. + * + * @param tasks Tasks associated with the command. + */ public void setData(TaskList tasks) { this.tasks = tasks; } + /** + * Executes the command. + * + * @return Result of the execution. + * @throws DukeException Exception that occurred during the execution of the command. + */ public abstract CommandResult execute() throws DukeException; } diff --git a/src/main/java/duke/commands/CommandResult.java b/src/main/java/duke/commands/CommandResult.java index 0982e8342b..41ec975875 100644 --- a/src/main/java/duke/commands/CommandResult.java +++ b/src/main/java/duke/commands/CommandResult.java @@ -1,24 +1,49 @@ package duke.commands; +/** + * Represents the result of a command's execution. + */ public class CommandResult { private final String userMessage; private final boolean hasUpdates; private final boolean isExit; + /** + * Constructor for a command result that takes in userMessage, hasUpdates and isExit. + * + * @param userMessage User message to be displayed to the user. + * @param hasUpdates Whether the command resulted in any changes to the task list. + * @param isExit Whether the command requests for the termination of the application. + */ public CommandResult(String userMessage, boolean hasUpdates, boolean isExit) { this.userMessage = userMessage; this.hasUpdates = hasUpdates; this.isExit = isExit; } + /** + * Gets the user message to be displayed to the user. + * + * @return User message. + */ public String getUserMessage() { return this.userMessage; } + /** + * Gets whether the command resulted in any changes to the task list. + * + * @return Whether there are any updates to the file. + */ public boolean shouldUpdateFile() { return this.hasUpdates; } + /** + * Gets whether the command requests for the termination of the application. + * + * @return Whether the application should exit. + */ public boolean shouldExit() { return this.isExit; } diff --git a/src/main/java/duke/commands/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java index 95ed90bd39..a6fbe8c455 100644 --- a/src/main/java/duke/commands/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -8,12 +8,22 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Represents a deadline command in the Duke application. + */ public class DeadlineCommand extends Command { + /** Command word of the deadline command. */ public static final String COMMAND_WORD = "deadline"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this deadline!\n %s\nNow you have %d tasks."; private final Deadline deadline; + /** + * Constructor for a deadline command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "description /by YYYY-MM-DD". + * @throws DukeException Exception due to invalid arguments. + */ public DeadlineCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); String description, deadline; @@ -34,6 +44,11 @@ public DeadlineCommand(String arguments) throws DukeException { this.deadline = new Deadline(description, localDate); } + /** + * Executes the command. + * + * @return Result of the execution. + */ @Override public CommandResult execute() { this.tasks.addTask(this.deadline); diff --git a/src/main/java/duke/commands/DeleteCommand.java b/src/main/java/duke/commands/DeleteCommand.java index 4ed0c04673..d83d6a4cf8 100644 --- a/src/main/java/duke/commands/DeleteCommand.java +++ b/src/main/java/duke/commands/DeleteCommand.java @@ -3,15 +3,30 @@ import duke.exceptions.DukeException; import duke.task.Task; +/** + * Represents a delete command in the Duke application. + */ public class DeleteCommand extends Command { + /** Command word of the delete command. */ public static final String COMMAND_WORD = "delete"; private static final String userMessageFormat = "Removing this task!\n %s\nNow you have %d tasks left."; private final int index; + /** + * Constructor for a delete command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "N". + */ public DeleteCommand(String arguments) { this.index = Integer.parseInt(arguments); } + /** + * Executes the command. + * + * @return Result of the execution. + * @throws DukeException Exception that occurred during the execution of the command. + */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. diff --git a/src/main/java/duke/commands/EventCommand.java b/src/main/java/duke/commands/EventCommand.java index 2fe8c0f509..e3deaa6b1b 100644 --- a/src/main/java/duke/commands/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -8,12 +8,22 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Represents an event command in the Duke application. + */ public class EventCommand extends Command { + /** Command word of the event command. */ public static final String COMMAND_WORD = "event"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this event!\n %s\nNow you have %d tasks."; private final Event event; + /** + * Constructor for an event command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "description /at YYYY-MM-DD". + * @throws DukeException Exception due to invalid arguments. + */ public EventCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); String description, date; @@ -34,6 +44,11 @@ public EventCommand(String arguments) throws DukeException { this.event = new Event(description, localDate); } + /** + * Executes the command. + * + * @return Result of the execution. + */ @Override public CommandResult execute() { this.tasks.addTask(this.event); diff --git a/src/main/java/duke/commands/ExitCommand.java b/src/main/java/duke/commands/ExitCommand.java index 052f11d095..b104ad0711 100644 --- a/src/main/java/duke/commands/ExitCommand.java +++ b/src/main/java/duke/commands/ExitCommand.java @@ -1,8 +1,17 @@ package duke.commands; +/** + * Represents an exit command in the Duke application. + */ public class ExitCommand extends Command { + /** Command word of the exit command. */ public static final String COMMAND_WORD = "bye"; + /** + * Executes the command. + * + * @return Result of the execution. + */ public CommandResult execute() { return new CommandResult("", false, true); } diff --git a/src/main/java/duke/commands/ListCommand.java b/src/main/java/duke/commands/ListCommand.java index 2ef9d54c27..53f1eb62e8 100644 --- a/src/main/java/duke/commands/ListCommand.java +++ b/src/main/java/duke/commands/ListCommand.java @@ -1,9 +1,18 @@ package duke.commands; +/** + * Represents a list command in the Duke application. + */ public class ListCommand extends Command { + /** Command word of the list command. */ public static final String COMMAND_WORD = "list"; private static final String lineFormat = "%d: %s"; + /** + * Executes the command. + * + * @return Result of the execution. + */ @Override public CommandResult execute() { String[] lines = new String[this.tasks.size()]; diff --git a/src/main/java/duke/commands/MarkCommand.java b/src/main/java/duke/commands/MarkCommand.java index a88b286f28..cb2cf412f8 100644 --- a/src/main/java/duke/commands/MarkCommand.java +++ b/src/main/java/duke/commands/MarkCommand.java @@ -3,15 +3,30 @@ import duke.exceptions.DukeException; import duke.task.Task; +/** + * Represents a mark command in the Duke application. + */ public class MarkCommand extends Command { + /** Command word of the mark command. */ public static final String COMMAND_WORD = "mark"; private static final String userMessageFormat = "Marked task %d as done!\n %s"; private final int index; + /** + * Constructor for a mark command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "N". + */ public MarkCommand(String arguments) { this.index = Integer.parseInt(arguments); } + /** + * Executes the command. + * + * @return Result of the execution. + * @throws DukeException Exception that occurred during the execution of the command. + */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. diff --git a/src/main/java/duke/commands/TodoCommand.java b/src/main/java/duke/commands/TodoCommand.java index 0eeb9f92c0..82468e02c0 100644 --- a/src/main/java/duke/commands/TodoCommand.java +++ b/src/main/java/duke/commands/TodoCommand.java @@ -3,11 +3,21 @@ import duke.exceptions.DukeException; import duke.task.Todo; +/** + * Represents a todo command in the Duke application. + */ public class TodoCommand extends Command { + /** Command word of the todo command. */ public static final String COMMAND_WORD = "todo"; private static final String userMessageFormat = "Added this todo!\n %s\nNow you have %d tasks."; private final Todo todo; + /** + * Constructor for a todo command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "description". + * @throws DukeException Exception due to invalid arguments. + */ public TodoCommand(String arguments) throws DukeException { if (arguments.length() < 1) { throw Todo.emptyDescription; @@ -16,6 +26,11 @@ public TodoCommand(String arguments) throws DukeException { this.todo = new Todo(arguments); } + /** + * Executes the command. + * + * @return Result of the execution. + */ @Override public CommandResult execute() { this.tasks.addTask(this.todo); diff --git a/src/main/java/duke/commands/UnmarkCommand.java b/src/main/java/duke/commands/UnmarkCommand.java index 6f6332ecaa..fc2d437410 100644 --- a/src/main/java/duke/commands/UnmarkCommand.java +++ b/src/main/java/duke/commands/UnmarkCommand.java @@ -3,15 +3,29 @@ import duke.exceptions.DukeException; import duke.task.Task; +/** + * Represents an unmark command in the Duke application. + */ public class UnmarkCommand extends Command { public static final String COMMAND_WORD = "unmark"; private static final String userMessageFormat = "Marked task %d as not done!\n %s"; private final int index; + /** + * Constructor for an unmark command that takes in arguments. + * + * @param arguments Arguments string is to be of the format "N". + */ public UnmarkCommand(String arguments) { this.index = Integer.parseInt(arguments); } + /** + * Executes the command. + * + * @return Result of the execution. + * @throws DukeException Exception that occurred during the execution of the command. + */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. diff --git a/src/main/java/duke/exceptions/DukeException.java b/src/main/java/duke/exceptions/DukeException.java index ce71e7fdfc..316f6b50f4 100644 --- a/src/main/java/duke/exceptions/DukeException.java +++ b/src/main/java/duke/exceptions/DukeException.java @@ -1,16 +1,18 @@ package duke.exceptions; /** - * Exception for the Duke application. + * Represents an exception in the Duke application. */ public class DukeException extends Exception { - // Some commonly used exceptions. + /** Exception due to an invalid index. */ public final static DukeException invalidIndex = new DukeException("Invalid index!"); + /** Exception due to an invalid date. */ public final static DukeException invalidDate = new DukeException("Invalid date!"); + /** Exception due to bad tasks data. */ public final static DukeException badData = new DukeException("Bad tasks data!"); /** - * Constructor for a Duke Exception, that takes in a message. + * Constructor for a Duke Exception that takes in a message. * * @param message Message for the Duke Exception. */ diff --git a/src/main/java/duke/parser/Parser.java b/src/main/java/duke/parser/Parser.java index f15c3ad2ec..e24270352c 100644 --- a/src/main/java/duke/parser/Parser.java +++ b/src/main/java/duke/parser/Parser.java @@ -14,10 +14,20 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +/** + * Represents a parser in the Duke application. + */ public class Parser { private static final Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)\\s?(?.*)"); private static final DukeException UNKNOWN_COMMAND = new DukeException("Unknown command!"); + /** + * Parses a user input into a command. + * + * @param userInput Input that the user has provided. + * @return Command parsed from the user input. + * @throws DukeException Exception that occurred during the parsing of the command. + */ public Command parseCommand(String userInput) throws DukeException { Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim()); String commandWord, arguments; diff --git a/src/main/java/duke/storage/Storage.java b/src/main/java/duke/storage/Storage.java index c18cab329b..3ec828736d 100644 --- a/src/main/java/duke/storage/Storage.java +++ b/src/main/java/duke/storage/Storage.java @@ -15,10 +15,20 @@ import java.nio.file.Paths; import java.util.Scanner; +/** + * Represents a storage in the Duke application. + * Responsible for loading and saving tasks to the file system. + */ public class Storage { private final String directoryPath; private final String filePath; + /** + * Constructor for a storage that takes in directory path and file path of the storage. + * + * @param directoryPath Directory path that the storage file is located in. + * @param filePath File path of the storage file. + */ public Storage(String directoryPath, String filePath) { this.directoryPath = directoryPath; this.filePath = filePath; @@ -28,6 +38,7 @@ public Storage(String directoryPath, String filePath) { * Load tasks from file. * * @return The tasks loaded from the file. + * @throws DukeException Exception that occurred during the loading of the tasks. */ public TaskList load() throws DukeException { Path directoryPath = Paths.get(this.directoryPath); @@ -81,7 +92,8 @@ public TaskList load() throws DukeException { /** * Save tasks to file. * - * @param tasks The tasks to be saved to the file. + * @param tasks Tasks to be saved to the file. + * @throws IOException Exception that occurred during the saving of the tasks. */ public void save(TaskList tasks) throws IOException { Path filePath = Paths.get(this.filePath); diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index f8ba59e7c2..4da8e76efb 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -6,9 +6,11 @@ import java.time.format.DateTimeFormatter; /** + * Represents a deadline task in the Duke application. * Deadline is a Task that needs to be done before a specific date/time. */ public class Deadline extends Task { + /** Exception due to wrong deadline format. */ public final static DukeException wrongFormat = new DukeException("Wrong format for Deadline!\nShould be 'deadline /by YYYY-MM-DD'."); @@ -16,7 +18,7 @@ public class Deadline extends Task { private final LocalDate deadline; /** - * Constructor for a deadline, with a description and deadline. + * Constructor for a deadline that takes in description and deadline. * Deadline is set as "not done" when created. * * @param description Description of a deadline. @@ -28,12 +30,11 @@ public Deadline(String description, LocalDate deadline) { } /** - * Factory method for a Deadline, with done and description and date. + * Factory method for a Deadline that takes in done, description and date. * - * @param done Whether the Deadline is done. + * @param done Whether the Deadline is done. * @param description Description of Deadline. - * @param date Date of Deadline. - * + * @param date Date of Deadline. * @return Deadline object with the given parameters. */ public static Deadline create(String done, String description, String date) { @@ -45,18 +46,18 @@ public static Deadline create(String done, String description, String date) { } /** - * Gets the string representation of a Deadline. + * Gets the Deadline in a format for file saving. * - * @return String representation of a Deadline. + * @return Deadline in file saving format. */ public String getFileFormat() { return String.format("D | %s | %s", super.getFileFormat(), this.deadline); } /** - * Gets the string representation of a deadline. + * Gets the string representation of a Deadline. * - * @return String representation of a deadline. + * @return String representation of a Deadline. */ @Override public String toString() { diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index ebb8dd1c58..ccbc6e9cd7 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -6,9 +6,11 @@ import java.time.format.DateTimeFormatter; /** + * Represents an event task in the Duke application. * Event is a Task that starts at a specific time and ends at a specific time. */ public class Event extends Task { + /** Exception due to wrong event format. */ public final static DukeException wrongFormat = new DukeException("Wrong format for Event!\nShould be 'event /at YYYY-MM-DD'."); @@ -16,7 +18,7 @@ public class Event extends Task { private final LocalDate date; /** - * Constructor for an event, with a description and date. + * Constructor for an event that takes in description and date. * Event is set as "not done" when created. * * @param description Description of an event. @@ -28,12 +30,11 @@ public Event(String description, LocalDate date) { } /** - * Factory method for an Event, with done and description and date. + * Factory method for an Event that takes in done, description and date. * - * @param done Whether the Event is done. + * @param done Whether the Event is done. * @param description Description of Event. - * @param date Date of Event. - * + * @param date Date of Event. * @return Event object with the given parameters. */ public static Event create(String done, String description, String date) { @@ -45,18 +46,18 @@ public static Event create(String done, String description, String date) { } /** - * Gets the string representation of an Event. + * Gets the Event in a format for file saving. * - * @return String representation of an Event. + * @return Event in file saving format. */ public String getFileFormat() { return String.format("E | %s | %s", super.getFileFormat(), this.date); } /** - * Gets the string representation of an event. + * Gets the string representation of an Event. * - * @return String representation of an event + * @return String representation of an Event. */ @Override public String toString() { diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 03af779e86..5e555182d0 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -1,7 +1,7 @@ package duke.task; /** - * Task is a representation of a task in Duke. + * Represents a task in the Duke application. */ public abstract class Task { /** Description of the task. */ @@ -10,12 +10,12 @@ public abstract class Task { private boolean isDone; /** - * Constructor for a Task, with a description. + * Constructor for a Task that takes in description. * Task is set as "not done" when created. * * @param description Description of a task. */ - public Task(String description) { + protected Task(String description) { this.description = description; this.isDone = false; } diff --git a/src/main/java/duke/task/TaskList.java b/src/main/java/duke/task/TaskList.java index 791e109cb7..dcebec39a8 100644 --- a/src/main/java/duke/task/TaskList.java +++ b/src/main/java/duke/task/TaskList.java @@ -2,25 +2,52 @@ import java.util.ArrayList; +/** + * Represents a list of tasks in the Duke application. + */ public class TaskList { private final ArrayList tasks; + /** + * Constructor to create an empty task list. + */ public TaskList() { this.tasks = new ArrayList<>(); } + /** + * Adds a task to the list. + * + * @param task Task to be added. + */ public void addTask(Task task) { this.tasks.add(task); } + /** + * Removes a task from the list. + * + * @param index Index of task to be removed. + */ public void removeTask(int index) { this.tasks.remove(index); } + /** + * Gets a task from the list. + * + * @param index Index of the task to be retrieved. + * @return The task to be retrieved. + */ public Task getTask(int index) { return this.tasks.get(index); } + /** + * Gets the size of the task list. + * + * @return The size of the task list. + */ public int size() { return this.tasks.size(); } diff --git a/src/main/java/duke/task/Todo.java b/src/main/java/duke/task/Todo.java index cecf919e3b..89d52ee228 100644 --- a/src/main/java/duke/task/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -3,13 +3,15 @@ import duke.exceptions.DukeException; /** + * Represents a todo task in the Duke application. * Todo is a Task without any date/time attached to it. */ public class Todo extends Task { + /** Exception due to empty todo description. */ public final static DukeException emptyDescription = new DukeException("Description of Todo cannot be empty!"); /** - * Constructor for a Todo, with a description. + * Constructor for a Todo that takes in description. * Todo is set as "not done" when created. * * @param description Description of a todo. @@ -19,11 +21,10 @@ public Todo(String description) { } /** - * Factory method for a Todo, with done and description. + * Factory method for a Todo that takes in done and description. * - * @param done Whether the Todo is done. + * @param done Whether the Todo is done. * @param description Description of Todo. - * * @return Todo object with the given parameters. */ public static Todo create(String done, String description) { @@ -35,18 +36,18 @@ public static Todo create(String done, String description) { } /** - * Gets the string representation of a Todo. + * Gets the Todo in a format for file saving. * - * @return String representation of a Todo. + * @return Todo in file saving format. */ public String getFileFormat() { return String.format("T | %s", super.getFileFormat()); } /** - * Gets the string representation of a todo. + * Gets the string representation of a Todo. * - * @return String representation of a todo. + * @return String representation of a Todo. */ @Override public String toString() { From 23a50fdae63b323e5428fcc1e1cc631f5d3c7d2a Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 14:23:32 +0800 Subject: [PATCH 39/65] Follow coding standard --- build.gradle | 5 + config/checkstyle/checkstyle.xml | 434 ++++++++++++++++++ config/checkstyle/suppressions.xml | 10 + src/main/java/duke/Duke.java | 8 +- .../java/duke/commands/DeadlineCommand.java | 16 +- .../java/duke/commands/DeleteCommand.java | 2 +- src/main/java/duke/commands/EventCommand.java | 16 +- src/main/java/duke/commands/MarkCommand.java | 2 +- src/main/java/duke/commands/TodoCommand.java | 2 +- .../java/duke/commands/UnmarkCommand.java | 2 +- .../java/duke/exceptions/DukeException.java | 6 +- src/main/java/duke/parser/Parser.java | 81 ++-- src/main/java/duke/storage/Storage.java | 38 +- src/main/java/duke/task/Deadline.java | 6 +- src/main/java/duke/task/Event.java | 6 +- src/main/java/duke/task/Task.java | 2 +- src/main/java/duke/task/Todo.java | 2 +- src/test/java/duke/parser/ParserTest.java | 19 +- src/test/java/duke/storage/StorageTest.java | 5 +- src/test/java/duke/task/DeadlineTest.java | 4 +- src/test/java/duke/task/EventTest.java | 4 +- src/test/java/duke/task/TodoTest.java | 4 +- 22 files changed, 565 insertions(+), 109 deletions(-) create mode 100644 config/checkstyle/checkstyle.xml create mode 100644 config/checkstyle/suppressions.xml diff --git a/build.gradle b/build.gradle index 2a5805f1b5..251b456c4c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ plugins { id 'java' id 'application' id "com.github.johnrengelman.shadow" version "7.1.2" + id 'checkstyle' } group 'org.example' @@ -36,6 +37,10 @@ test { useJUnitPlatform() } +checkstyle { + toolVersion = '10.2' +} + dependencies { testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.9.0' testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.9.0' diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000000..e3c0256c59 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,434 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml new file mode 100644 index 0000000000..6423654db1 --- /dev/null +++ b/config/checkstyle/suppressions.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index 22743fa353..984d30e133 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -1,16 +1,16 @@ package duke; +import java.io.IOException; +import java.util.Scanner; + import duke.commands.Command; import duke.commands.CommandResult; import duke.exceptions.DukeException; -import duke.task.TaskList; import duke.parser.Parser; import duke.storage.Storage; +import duke.task.TaskList; import duke.ui.Ui; -import java.io.IOException; -import java.util.Scanner; - public class Duke { private final Parser parser; private final Storage storage; diff --git a/src/main/java/duke/commands/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java index 95ed90bd39..7354161a4e 100644 --- a/src/main/java/duke/commands/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -1,34 +1,36 @@ package duke.commands; -import duke.exceptions.DukeException; -import duke.task.Deadline; - import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; +import duke.exceptions.DukeException; +import duke.task.Deadline; + public class DeadlineCommand extends Command { public static final String COMMAND_WORD = "deadline"; - private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); + private static final Pattern ARGUMENTS_FORMAT = + Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this deadline!\n %s\nNow you have %d tasks."; private final Deadline deadline; public DeadlineCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); - String description, deadline; + String description; + String deadline; if (matcher.matches()) { description = matcher.group("description"); deadline = matcher.group("deadline"); } else { - throw Deadline.wrongFormat; + throw Deadline.WRONG_FORMAT; } LocalDate localDate; try { localDate = LocalDate.parse(deadline); } catch (DateTimeParseException e) { - throw DukeException.invalidDate; + throw DukeException.INVALID_DATE; } this.deadline = new Deadline(description, localDate); diff --git a/src/main/java/duke/commands/DeleteCommand.java b/src/main/java/duke/commands/DeleteCommand.java index 4ed0c04673..5cd314323f 100644 --- a/src/main/java/duke/commands/DeleteCommand.java +++ b/src/main/java/duke/commands/DeleteCommand.java @@ -16,7 +16,7 @@ public DeleteCommand(String arguments) { public CommandResult execute() throws DukeException { // Check if index is out of bounds. if (this.index <= 0 || this.index > this.tasks.size()) { - throw DukeException.invalidIndex; + throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. Task task = this.tasks.getTask(this.index - 1); diff --git a/src/main/java/duke/commands/EventCommand.java b/src/main/java/duke/commands/EventCommand.java index 2fe8c0f509..c60cc446d7 100644 --- a/src/main/java/duke/commands/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -1,34 +1,36 @@ package duke.commands; -import duke.exceptions.DukeException; -import duke.task.Event; - import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; +import duke.exceptions.DukeException; +import duke.task.Event; + public class EventCommand extends Command { public static final String COMMAND_WORD = "event"; - private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); + private static final Pattern ARGUMENTS_FORMAT = + Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); private static final String userMessageFormat = "Added this event!\n %s\nNow you have %d tasks."; private final Event event; public EventCommand(String arguments) throws DukeException { Matcher matcher = ARGUMENTS_FORMAT.matcher(arguments); - String description, date; + String description; + String date; if (matcher.matches()) { description = matcher.group("description"); date = matcher.group("date"); } else { - throw Event.wrongFormat; + throw Event.WRONG_FORMAT; } LocalDate localDate; try { localDate = LocalDate.parse(date); } catch (DateTimeParseException e) { - throw DukeException.invalidDate; + throw DukeException.INVALID_DATE; } this.event = new Event(description, localDate); diff --git a/src/main/java/duke/commands/MarkCommand.java b/src/main/java/duke/commands/MarkCommand.java index a88b286f28..0229efd382 100644 --- a/src/main/java/duke/commands/MarkCommand.java +++ b/src/main/java/duke/commands/MarkCommand.java @@ -16,7 +16,7 @@ public MarkCommand(String arguments) { public CommandResult execute() throws DukeException { // Check if index is out of bounds. if (this.index <= 0 || this.index > this.tasks.size()) { - throw DukeException.invalidIndex; + throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. Task task = this.tasks.getTask(this.index - 1); diff --git a/src/main/java/duke/commands/TodoCommand.java b/src/main/java/duke/commands/TodoCommand.java index 0eeb9f92c0..4504674f00 100644 --- a/src/main/java/duke/commands/TodoCommand.java +++ b/src/main/java/duke/commands/TodoCommand.java @@ -10,7 +10,7 @@ public class TodoCommand extends Command { public TodoCommand(String arguments) throws DukeException { if (arguments.length() < 1) { - throw Todo.emptyDescription; + throw Todo.EMPTY_DESCRIPTION; } this.todo = new Todo(arguments); diff --git a/src/main/java/duke/commands/UnmarkCommand.java b/src/main/java/duke/commands/UnmarkCommand.java index 6f6332ecaa..9f58a15759 100644 --- a/src/main/java/duke/commands/UnmarkCommand.java +++ b/src/main/java/duke/commands/UnmarkCommand.java @@ -16,7 +16,7 @@ public UnmarkCommand(String arguments) { public CommandResult execute() throws DukeException { // Check if index is out of bounds. if (this.index <= 0 || this.index > this.tasks.size()) { - throw DukeException.invalidIndex; + throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. Task task = this.tasks.getTask(this.index - 1); diff --git a/src/main/java/duke/exceptions/DukeException.java b/src/main/java/duke/exceptions/DukeException.java index ce71e7fdfc..a5c9dbe36a 100644 --- a/src/main/java/duke/exceptions/DukeException.java +++ b/src/main/java/duke/exceptions/DukeException.java @@ -5,9 +5,9 @@ */ public class DukeException extends Exception { // Some commonly used exceptions. - public final static DukeException invalidIndex = new DukeException("Invalid index!"); - public final static DukeException invalidDate = new DukeException("Invalid date!"); - public final static DukeException badData = new DukeException("Bad tasks data!"); + public static final DukeException INVALID_INDEX = new DukeException("Invalid index!"); + public static final DukeException INVALID_DATE = new DukeException("Invalid date!"); + public static final DukeException BAD_DATA = new DukeException("Bad tasks data!"); /** * Constructor for a Duke Exception, that takes in a message. diff --git a/src/main/java/duke/parser/Parser.java b/src/main/java/duke/parser/Parser.java index f15c3ad2ec..3a1546fd14 100644 --- a/src/main/java/duke/parser/Parser.java +++ b/src/main/java/duke/parser/Parser.java @@ -1,26 +1,27 @@ package duke.parser; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import duke.commands.Command; +import duke.commands.DeadlineCommand; +import duke.commands.DeleteCommand; +import duke.commands.EventCommand; import duke.commands.ExitCommand; import duke.commands.ListCommand; import duke.commands.MarkCommand; -import duke.commands.UnmarkCommand; -import duke.commands.DeleteCommand; import duke.commands.TodoCommand; -import duke.commands.DeadlineCommand; -import duke.commands.EventCommand; +import duke.commands.UnmarkCommand; import duke.exceptions.DukeException; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - public class Parser { private static final Pattern BASIC_COMMAND_FORMAT = Pattern.compile("(?\\S+)\\s?(?.*)"); private static final DukeException UNKNOWN_COMMAND = new DukeException("Unknown command!"); public Command parseCommand(String userInput) throws DukeException { Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim()); - String commandWord, arguments; + String commandWord; + String arguments; if (matcher.matches()) { commandWord = matcher.group("commandWord"); arguments = matcher.group("arguments"); @@ -30,38 +31,38 @@ public Command parseCommand(String userInput) throws DukeException { Command command; switch (commandWord) { - case ExitCommand.COMMAND_WORD: - command = new ExitCommand(); - break; - case ListCommand.COMMAND_WORD: - command = new ListCommand(); - break; - case MarkCommand.COMMAND_WORD: { - command = new MarkCommand(arguments); - break; - } - case UnmarkCommand.COMMAND_WORD: { - command = new UnmarkCommand(arguments); - break; - } - case DeleteCommand.COMMAND_WORD: { - command = new DeleteCommand(arguments); - break; - } - case TodoCommand.COMMAND_WORD: { - command = new TodoCommand(arguments); - break; - } - case DeadlineCommand.COMMAND_WORD: { - command = new DeadlineCommand(arguments); - break; - } - case EventCommand.COMMAND_WORD: { - command = new EventCommand(arguments); - break; - } - default: - throw Parser.UNKNOWN_COMMAND; + case ExitCommand.COMMAND_WORD: + command = new ExitCommand(); + break; + case ListCommand.COMMAND_WORD: + command = new ListCommand(); + break; + case MarkCommand.COMMAND_WORD: { + command = new MarkCommand(arguments); + break; + } + case UnmarkCommand.COMMAND_WORD: { + command = new UnmarkCommand(arguments); + break; + } + case DeleteCommand.COMMAND_WORD: { + command = new DeleteCommand(arguments); + break; + } + case TodoCommand.COMMAND_WORD: { + command = new TodoCommand(arguments); + break; + } + case DeadlineCommand.COMMAND_WORD: { + command = new DeadlineCommand(arguments); + break; + } + case EventCommand.COMMAND_WORD: { + command = new EventCommand(arguments); + break; + } + default: + throw Parser.UNKNOWN_COMMAND; } return command; diff --git a/src/main/java/duke/storage/Storage.java b/src/main/java/duke/storage/Storage.java index c18cab329b..591b041dd9 100644 --- a/src/main/java/duke/storage/Storage.java +++ b/src/main/java/duke/storage/Storage.java @@ -1,12 +1,5 @@ package duke.storage; -import duke.exceptions.DukeException; -import duke.task.TaskList; -import duke.task.Task; -import duke.task.Todo; -import duke.task.Deadline; -import duke.task.Event; - import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; @@ -15,6 +8,13 @@ import java.nio.file.Paths; import java.util.Scanner; +import duke.exceptions.DukeException; +import duke.task.Deadline; +import duke.task.Event; +import duke.task.Task; +import duke.task.TaskList; +import duke.task.Todo; + public class Storage { private final String directoryPath; private final String filePath; @@ -46,7 +46,7 @@ public TaskList load() throws DukeException { return tasks; } } catch (IOException e) { - throw DukeException.badData; + throw DukeException.BAD_DATA; } try (Scanner scanner = new Scanner(file)) { @@ -55,17 +55,17 @@ public TaskList load() throws DukeException { String[] split = line.split(" \\| "); Task task; switch (split[0]) { - case "T": - task = Todo.create(split[1], split[2]); - break; - case "D": - task = Deadline.create(split[1], split[2], split[3]); - break; - case "E": - task = Event.create(split[1], split[2], split[3]); - break; - default: - throw DukeException.badData; + case "T": + task = Todo.create(split[1], split[2]); + break; + case "D": + task = Deadline.create(split[1], split[2], split[3]); + break; + case "E": + task = Event.create(split[1], split[2], split[3]); + break; + default: + throw DukeException.BAD_DATA; } tasks.addTask(task); diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index f8ba59e7c2..aa82f16daf 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -1,15 +1,15 @@ package duke.task; -import duke.exceptions.DukeException; - import java.time.LocalDate; import java.time.format.DateTimeFormatter; +import duke.exceptions.DukeException; + /** * Deadline is a Task that needs to be done before a specific date/time. */ public class Deadline extends Task { - public final static DukeException wrongFormat = + public static final DukeException WRONG_FORMAT = new DukeException("Wrong format for Deadline!\nShould be 'deadline /by YYYY-MM-DD'."); /** Deadline of the deadline. */ diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index ebb8dd1c58..719bcc3137 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -1,15 +1,15 @@ package duke.task; -import duke.exceptions.DukeException; - import java.time.LocalDate; import java.time.format.DateTimeFormatter; +import duke.exceptions.DukeException; + /** * Event is a Task that starts at a specific time and ends at a specific time. */ public class Event extends Task { - public final static DukeException wrongFormat = + public static final DukeException WRONG_FORMAT = new DukeException("Wrong format for Event!\nShould be 'event /at YYYY-MM-DD'."); /** Date of the event. */ diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 03af779e86..92f18a3399 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -50,7 +50,7 @@ public String getFileFormat() { */ @Override public String toString() { - String doneIcon = this.isDone ? "X" : " " ; + String doneIcon = this.isDone ? "X" : " "; return String.format("[%s] %s", doneIcon, this.description); } } diff --git a/src/main/java/duke/task/Todo.java b/src/main/java/duke/task/Todo.java index cecf919e3b..7f475dc4dc 100644 --- a/src/main/java/duke/task/Todo.java +++ b/src/main/java/duke/task/Todo.java @@ -6,7 +6,7 @@ * Todo is a Task without any date/time attached to it. */ public class Todo extends Task { - public final static DukeException emptyDescription = new DukeException("Description of Todo cannot be empty!"); + public static final DukeException EMPTY_DESCRIPTION = new DukeException("Description of Todo cannot be empty!"); /** * Constructor for a Todo, with a description. diff --git a/src/test/java/duke/parser/ParserTest.java b/src/test/java/duke/parser/ParserTest.java index efc4455327..7fe947aa75 100644 --- a/src/test/java/duke/parser/ParserTest.java +++ b/src/test/java/duke/parser/ParserTest.java @@ -1,20 +1,21 @@ package duke.parser; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + import duke.commands.Command; +import duke.commands.DeadlineCommand; +import duke.commands.DeleteCommand; +import duke.commands.EventCommand; import duke.commands.ExitCommand; import duke.commands.ListCommand; import duke.commands.MarkCommand; -import duke.commands.UnmarkCommand; -import duke.commands.DeleteCommand; import duke.commands.TodoCommand; -import duke.commands.DeadlineCommand; -import duke.commands.EventCommand; +import duke.commands.UnmarkCommand; import duke.exceptions.DukeException; -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertThrows; public class ParserTest { @Test diff --git a/src/test/java/duke/storage/StorageTest.java b/src/test/java/duke/storage/StorageTest.java index 20b3820c3e..73f75dd16b 100644 --- a/src/test/java/duke/storage/StorageTest.java +++ b/src/test/java/duke/storage/StorageTest.java @@ -1,9 +1,10 @@ package duke.storage; -import duke.task.TaskList; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; + import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import duke.task.TaskList; public class StorageTest { private static final String directoryPath = "data"; diff --git a/src/test/java/duke/task/DeadlineTest.java b/src/test/java/duke/task/DeadlineTest.java index 3e632ea7b9..5bb6374f76 100644 --- a/src/test/java/duke/task/DeadlineTest.java +++ b/src/test/java/duke/task/DeadlineTest.java @@ -1,9 +1,9 @@ package duke.task; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + public class DeadlineTest { @Test public void create_notDoneString_createdCorrectly() { diff --git a/src/test/java/duke/task/EventTest.java b/src/test/java/duke/task/EventTest.java index 1bdac48741..372e849991 100644 --- a/src/test/java/duke/task/EventTest.java +++ b/src/test/java/duke/task/EventTest.java @@ -1,9 +1,9 @@ package duke.task; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + public class EventTest { @Test public void create_notDoneString_createdCorrectly() { diff --git a/src/test/java/duke/task/TodoTest.java b/src/test/java/duke/task/TodoTest.java index 24217c30db..5b9184b71c 100644 --- a/src/test/java/duke/task/TodoTest.java +++ b/src/test/java/duke/task/TodoTest.java @@ -1,9 +1,9 @@ package duke.task; -import org.junit.jupiter.api.Test; - import static org.junit.jupiter.api.Assertions.assertEquals; +import org.junit.jupiter.api.Test; + public class TodoTest { @Test public void create_notDoneString_createdCorrectly() { From e433e4b381e1153f95a3d20fd159725fea325fcc Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 14:41:24 +0800 Subject: [PATCH 40/65] Find task by keyword --- src/main/java/duke/commands/FindCommand.java | 47 ++++++++++++++++++++ src/main/java/duke/parser/Parser.java | 5 +++ src/main/java/duke/task/Task.java | 10 +++++ src/test/java/duke/parser/ParserTest.java | 6 +++ 4 files changed, 68 insertions(+) create mode 100644 src/main/java/duke/commands/FindCommand.java diff --git a/src/main/java/duke/commands/FindCommand.java b/src/main/java/duke/commands/FindCommand.java new file mode 100644 index 0000000000..e6c98dc637 --- /dev/null +++ b/src/main/java/duke/commands/FindCommand.java @@ -0,0 +1,47 @@ +package duke.commands; + +import java.util.ArrayList; + +import duke.task.Task; + +/** + * Represents a find command in the Duke application. + */ +public class FindCommand extends Command { + /** Command word of the find command. */ + public static final String COMMAND_WORD = "find"; + private static final String TASK_FORMAT = "%d: %s"; + private static final String USER_MESSAGE_FORMAT = "Here are the matching tasks in your list!\n%s"; + private final String keyword; + + /** + * Constructor for a delete command that takes in arguments. + * + * @param arguments Arguments string is the find keyword. + */ + public FindCommand(String arguments) { + this.keyword = arguments; + } + + /** + * Executes the command. + * + * @return Result of the execution. + */ + @Override + public CommandResult execute() { + ArrayList foundTasks = new ArrayList<>(); + + for (int i = 0; i < this.tasks.size(); i++) { + Task task = this.tasks.getTask(i); + if (task.containsKeyword(this.keyword)) { + String taskString = String.format(TASK_FORMAT, i + 1, task); + foundTasks.add(taskString); + } + } + + String tasksString = String.join("\n", foundTasks); + String userMessage = String.format(USER_MESSAGE_FORMAT, tasksString); + return new CommandResult(userMessage, false, false); + } +} diff --git a/src/main/java/duke/parser/Parser.java b/src/main/java/duke/parser/Parser.java index f15c3ad2ec..a2be117b6b 100644 --- a/src/main/java/duke/parser/Parser.java +++ b/src/main/java/duke/parser/Parser.java @@ -9,6 +9,7 @@ import duke.commands.TodoCommand; import duke.commands.DeadlineCommand; import duke.commands.EventCommand; +import duke.commands.FindCommand; import duke.exceptions.DukeException; import java.util.regex.Matcher; @@ -60,6 +61,10 @@ public Command parseCommand(String userInput) throws DukeException { command = new EventCommand(arguments); break; } + case FindCommand.COMMAND_WORD: { + command = new FindCommand(arguments); + break; + } default: throw Parser.UNKNOWN_COMMAND; } diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 03af779e86..22c84049b0 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -34,6 +34,16 @@ public void markAsUndone() { this.isDone = false; } + /** + * Checks if the description of the task contains the keyword. + * + * @param keyword Keyword to be checked against. + * @return True if task contains keyword. + */ + public boolean containsKeyword(String keyword) { + return this.description.contains(keyword); + } + /** * Gets the task in a format for file saving. * diff --git a/src/test/java/duke/parser/ParserTest.java b/src/test/java/duke/parser/ParserTest.java index efc4455327..b155a0bc02 100644 --- a/src/test/java/duke/parser/ParserTest.java +++ b/src/test/java/duke/parser/ParserTest.java @@ -2,6 +2,7 @@ import duke.commands.Command; import duke.commands.ExitCommand; +import duke.commands.FindCommand; import duke.commands.ListCommand; import duke.commands.MarkCommand; import duke.commands.UnmarkCommand; @@ -67,6 +68,11 @@ public void parseCommand_eventCommandMissingDate_errorMessage() { parseCommandAndExpectException("event abc", DukeException.class); } + @Test + public void parseCommand_findCommand_parsedCorrectly() { + parseCommandAndAssert("find x", FindCommand.class); + } + @Test public void parseCommand_invalidCommand_errorMessage() { parseCommandAndExpectException("invalidcommand", DukeException.class); From 62cb9bb0d8c0b8a14a0976917d43b9d23cb36560 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 14:57:42 +0800 Subject: [PATCH 41/65] Fix some constant names --- .../java/duke/commands/DeadlineCommand.java | 4 +- .../java/duke/commands/DeleteCommand.java | 4 +- src/main/java/duke/commands/EventCommand.java | 4 +- src/main/java/duke/commands/ListCommand.java | 4 +- src/main/java/duke/commands/MarkCommand.java | 4 +- src/main/java/duke/commands/TodoCommand.java | 4 +- .../java/duke/commands/UnmarkCommand.java | 4 +- src/main/java/duke/ui/Ui.java | 43 +++++++++++++++---- src/test/java/duke/storage/StorageTest.java | 8 ++-- 9 files changed, 52 insertions(+), 27 deletions(-) diff --git a/src/main/java/duke/commands/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java index 7ac46cd971..ab3cb05bcf 100644 --- a/src/main/java/duke/commands/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -16,7 +16,7 @@ public class DeadlineCommand extends Command { public static final String COMMAND_WORD = "deadline"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); - private static final String userMessageFormat = "Added this deadline!\n %s\nNow you have %d tasks."; + private static final String USER_MESSAGE_FORMAT = "Added this deadline!\n %s\nNow you have %d tasks."; private final Deadline deadline; /** @@ -55,7 +55,7 @@ public DeadlineCommand(String arguments) throws DukeException { public CommandResult execute() { this.tasks.addTask(this.deadline); int numberOfTasks = this.tasks.size(); - String userMessage = String.format(userMessageFormat, this.deadline, numberOfTasks); + String userMessage = String.format(USER_MESSAGE_FORMAT, this.deadline, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/DeleteCommand.java b/src/main/java/duke/commands/DeleteCommand.java index 8ef07f0635..64db40eb05 100644 --- a/src/main/java/duke/commands/DeleteCommand.java +++ b/src/main/java/duke/commands/DeleteCommand.java @@ -9,7 +9,7 @@ public class DeleteCommand extends Command { /** Command word of the delete command. */ public static final String COMMAND_WORD = "delete"; - private static final String userMessageFormat = "Removing this task!\n %s\nNow you have %d tasks left."; + private static final String USER_MESSAGE_FORMAT = "Removing this task!\n %s\nNow you have %d tasks left."; private final int index; /** @@ -37,7 +37,7 @@ public CommandResult execute() throws DukeException { Task task = this.tasks.getTask(this.index - 1); this.tasks.removeTask(this.index - 1); int numberOfTasks = this.tasks.size(); - String userMessage = String.format(userMessageFormat, task, numberOfTasks); + String userMessage = String.format(USER_MESSAGE_FORMAT, task, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/EventCommand.java b/src/main/java/duke/commands/EventCommand.java index acc35b54c7..d4d0ea15f2 100644 --- a/src/main/java/duke/commands/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -16,7 +16,7 @@ public class EventCommand extends Command { public static final String COMMAND_WORD = "event"; private static final Pattern ARGUMENTS_FORMAT = Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); - private static final String userMessageFormat = "Added this event!\n %s\nNow you have %d tasks."; + private static final String USER_MESSAGE_FORMAT = "Added this event!\n %s\nNow you have %d tasks."; private final Event event; /** @@ -55,7 +55,7 @@ public EventCommand(String arguments) throws DukeException { public CommandResult execute() { this.tasks.addTask(this.event); int numberOfTasks = this.tasks.size(); - String userMessage = String.format(userMessageFormat, this.event, numberOfTasks); + String userMessage = String.format(USER_MESSAGE_FORMAT, this.event, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/ListCommand.java b/src/main/java/duke/commands/ListCommand.java index 53f1eb62e8..ac9ea1472a 100644 --- a/src/main/java/duke/commands/ListCommand.java +++ b/src/main/java/duke/commands/ListCommand.java @@ -6,7 +6,7 @@ public class ListCommand extends Command { /** Command word of the list command. */ public static final String COMMAND_WORD = "list"; - private static final String lineFormat = "%d: %s"; + private static final String LINE_FORMAT = "%d: %s"; /** * Executes the command. @@ -18,7 +18,7 @@ public CommandResult execute() { String[] lines = new String[this.tasks.size()]; for (int i = 0; i < tasks.size(); i++) { - lines[i] = String.format(lineFormat, i + 1, this.tasks.getTask(i)); + lines[i] = String.format(LINE_FORMAT, i + 1, this.tasks.getTask(i)); } String userMessage = String.join("\n", lines); diff --git a/src/main/java/duke/commands/MarkCommand.java b/src/main/java/duke/commands/MarkCommand.java index 1adb594b70..6e87082bc5 100644 --- a/src/main/java/duke/commands/MarkCommand.java +++ b/src/main/java/duke/commands/MarkCommand.java @@ -9,7 +9,7 @@ public class MarkCommand extends Command { /** Command word of the mark command. */ public static final String COMMAND_WORD = "mark"; - private static final String userMessageFormat = "Marked task %d as done!\n %s"; + private static final String USER_MESSAGE_FORMAT = "Marked task %d as done!\n %s"; private final int index; /** @@ -36,7 +36,7 @@ public CommandResult execute() throws DukeException { // Subtract 1 to account for 0-index data structure. Task task = this.tasks.getTask(this.index - 1); task.markAsDone(); - String userMessage = String.format(userMessageFormat, this.index, task); + String userMessage = String.format(USER_MESSAGE_FORMAT, this.index, task); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/TodoCommand.java b/src/main/java/duke/commands/TodoCommand.java index fb841d6380..0027372cb0 100644 --- a/src/main/java/duke/commands/TodoCommand.java +++ b/src/main/java/duke/commands/TodoCommand.java @@ -9,7 +9,7 @@ public class TodoCommand extends Command { /** Command word of the todo command. */ public static final String COMMAND_WORD = "todo"; - private static final String userMessageFormat = "Added this todo!\n %s\nNow you have %d tasks."; + private static final String USER_MESSAGE_FORMAT = "Added this todo!\n %s\nNow you have %d tasks."; private final Todo todo; /** @@ -35,7 +35,7 @@ public TodoCommand(String arguments) throws DukeException { public CommandResult execute() { this.tasks.addTask(this.todo); int numberOfTasks = this.tasks.size(); - String userMessage = String.format(userMessageFormat, this.todo, numberOfTasks); + String userMessage = String.format(USER_MESSAGE_FORMAT, this.todo, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/UnmarkCommand.java b/src/main/java/duke/commands/UnmarkCommand.java index d4765bd224..a974511d2a 100644 --- a/src/main/java/duke/commands/UnmarkCommand.java +++ b/src/main/java/duke/commands/UnmarkCommand.java @@ -8,7 +8,7 @@ */ public class UnmarkCommand extends Command { public static final String COMMAND_WORD = "unmark"; - private static final String userMessageFormat = "Marked task %d as not done!\n %s"; + private static final String USER_MESSAGE_FORMAT = "Marked task %d as not done!\n %s"; private final int index; /** @@ -35,7 +35,7 @@ public CommandResult execute() throws DukeException { // Subtract 1 to account for 0-index data structure. Task task = this.tasks.getTask(this.index - 1); task.markAsUndone(); - String userMessage = String.format(userMessageFormat, this.index, task); + String userMessage = String.format(USER_MESSAGE_FORMAT, this.index, task); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/ui/Ui.java b/src/main/java/duke/ui/Ui.java index a6f5570a85..8b9301be3a 100644 --- a/src/main/java/duke/ui/Ui.java +++ b/src/main/java/duke/ui/Ui.java @@ -2,10 +2,14 @@ import duke.commands.CommandResult; +/** + * Represents the UI in the Duke application. + * Responsible for displaying text output to the user. + */ public class Ui { - private static final String indentation = " "; - private static final String horizontalLine = "____________________________________________________________"; - private static final String lineSeparator = System.lineSeparator(); + private static final String INDENTATION = " "; + private static final String HORIZONTAL_LINE = "____________________________________________________________"; + private static final String LINE_SEPARATOR = System.lineSeparator(); /** * Show messages to the user. @@ -15,13 +19,16 @@ public class Ui { public void show(String... messages) { for (String m : messages) { // Formats message. - System.out.println(indentation + m.replace("\n", lineSeparator + indentation)); + System.out.println(INDENTATION + m.replace("\n", LINE_SEPARATOR + INDENTATION)); } } + /** + * Shows the welcome message to the user. + */ public void showWelcomeMessage() { this.show( - horizontalLine, + HORIZONTAL_LINE, "Hello I'm", "____ _ ", "| _ \\ _ _| | _____ ", @@ -30,29 +37,47 @@ public void showWelcomeMessage() { "|____/ \\__,_|_|\\_\\___|", "", "What can I do for you?", - horizontalLine + HORIZONTAL_LINE ); } + /** + * Shows the goodbye message to the user. + */ public void showGoodbyeMessage() { this.show( "Bye, hope to see you soon!", - horizontalLine + HORIZONTAL_LINE ); } + /** + * Shows an error message to the user. + * + * @param message Error message to be shown to the user. + */ public void showErrorMessage(String message) { this.show( message, - horizontalLine + HORIZONTAL_LINE ); } + /** + * Shows an exception's message to the user. + * + * @param exception Exception to be shown to the user. + */ public void showErrorMessage(Exception exception) { this.showErrorMessage(exception.getMessage()); } + /** + * Shows a result's message to the user. + * + * @param result Result to be shown to the user. + */ public void showResult(CommandResult result) { - this.show(result.getUserMessage(), horizontalLine); + this.show(result.getUserMessage(), HORIZONTAL_LINE); } } diff --git a/src/test/java/duke/storage/StorageTest.java b/src/test/java/duke/storage/StorageTest.java index 73f75dd16b..02af021c40 100644 --- a/src/test/java/duke/storage/StorageTest.java +++ b/src/test/java/duke/storage/StorageTest.java @@ -7,12 +7,12 @@ import duke.task.TaskList; public class StorageTest { - private static final String directoryPath = "data"; - private static final String filePath = "data/tasks"; + private static final String DIRECTORY_PATH = "data"; + private static final String FILE_PATH = "data/tasks"; @Test public void load_loadTasks_noException() { - Storage storage = new Storage(directoryPath, filePath); + Storage storage = new Storage(DIRECTORY_PATH, FILE_PATH); assertDoesNotThrow(() -> { storage.load(); }); @@ -20,7 +20,7 @@ public void load_loadTasks_noException() { @Test public void save_saveTasks_noException() { - Storage storage = new Storage(directoryPath, filePath); + Storage storage = new Storage(DIRECTORY_PATH, FILE_PATH); assertDoesNotThrow(() -> storage.save(new TaskList())); } } From 14852fad81e45cbf3a92b382dff3c7df2a0e5d06 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sun, 21 Aug 2022 15:07:30 +0800 Subject: [PATCH 42/65] Add no tasks found message --- src/main/java/duke/commands/FindCommand.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/duke/commands/FindCommand.java b/src/main/java/duke/commands/FindCommand.java index e6c98dc637..673180853b 100644 --- a/src/main/java/duke/commands/FindCommand.java +++ b/src/main/java/duke/commands/FindCommand.java @@ -40,8 +40,14 @@ public CommandResult execute() { } } - String tasksString = String.join("\n", foundTasks); - String userMessage = String.format(USER_MESSAGE_FORMAT, tasksString); + String userMessage; + if (foundTasks.isEmpty()) { + userMessage = "No tasks found!"; + } else { + String tasksString = String.join("\n", foundTasks); + userMessage = String.format(USER_MESSAGE_FORMAT, tasksString); + } + return new CommandResult(userMessage, false, false); } } From 026f533731e745129068d50cb7a3e85626f3a21f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Tue, 23 Aug 2022 13:15:16 +0800 Subject: [PATCH 43/65] Change LocalDate to LocalDateTime --- .../java/duke/commands/DeadlineCommand.java | 12 +++--- src/main/java/duke/commands/EventCommand.java | 12 +++--- src/main/java/duke/task/Deadline.java | 12 +++--- src/main/java/duke/task/Event.java | 12 +++--- src/test/java/duke/parser/ParserTest.java | 4 +- src/test/java/duke/task/DeadlineTest.java | 24 +++++------ src/test/java/duke/task/EventTest.java | 24 +++++------ text-ui-test/EXPECTED.TXT | 40 +++++++++---------- text-ui-test/input.txt | 8 ++-- text-ui-test/runtest.sh | 2 +- 10 files changed, 77 insertions(+), 73 deletions(-) diff --git a/src/main/java/duke/commands/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java index ab3cb05bcf..db1c700926 100644 --- a/src/main/java/duke/commands/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -1,6 +1,7 @@ package duke.commands; -import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -15,7 +16,7 @@ public class DeadlineCommand extends Command { /** Command word of the deadline command. */ public static final String COMMAND_WORD = "deadline"; private static final Pattern ARGUMENTS_FORMAT = - Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2})"); + Pattern.compile("(?.+)\\s+/by\\s+(?\\d{4}-\\d{2}-\\d{2}\\s+\\d{4})"); private static final String USER_MESSAGE_FORMAT = "Added this deadline!\n %s\nNow you have %d tasks."; private final Deadline deadline; @@ -36,14 +37,15 @@ public DeadlineCommand(String arguments) throws DukeException { throw Deadline.WRONG_FORMAT; } - LocalDate localDate; + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm"); + LocalDateTime localDateTime; try { - localDate = LocalDate.parse(deadline); + localDateTime = LocalDateTime.parse(deadline, formatter); } catch (DateTimeParseException e) { throw DukeException.INVALID_DATE; } - this.deadline = new Deadline(description, localDate); + this.deadline = new Deadline(description, localDateTime); } /** diff --git a/src/main/java/duke/commands/EventCommand.java b/src/main/java/duke/commands/EventCommand.java index d4d0ea15f2..0ae8d72681 100644 --- a/src/main/java/duke/commands/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -1,6 +1,7 @@ package duke.commands; -import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -15,7 +16,7 @@ public class EventCommand extends Command { /** Command word of the event command. */ public static final String COMMAND_WORD = "event"; private static final Pattern ARGUMENTS_FORMAT = - Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2})"); + Pattern.compile("(?.+)\\s+/at\\s+(?\\d{4}-\\d{2}-\\d{2}\\s+\\d{4})"); private static final String USER_MESSAGE_FORMAT = "Added this event!\n %s\nNow you have %d tasks."; private final Event event; @@ -36,14 +37,15 @@ public EventCommand(String arguments) throws DukeException { throw Event.WRONG_FORMAT; } - LocalDate localDate; + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm"); + LocalDateTime localDateTime; try { - localDate = LocalDate.parse(date); + localDateTime = LocalDateTime.parse(date, formatter); } catch (DateTimeParseException e) { throw DukeException.INVALID_DATE; } - this.event = new Event(description, localDate); + this.event = new Event(description, localDateTime); } /** diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index 6f2ce3f5ad..2b2d0e890e 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -1,6 +1,6 @@ package duke.task; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import duke.exceptions.DukeException; @@ -12,10 +12,10 @@ public class Deadline extends Task { /** Exception due to wrong deadline format. */ public static final DukeException WRONG_FORMAT = - new DukeException("Wrong format for Deadline!\nShould be 'deadline /by YYYY-MM-DD'."); + new DukeException("Wrong format for Deadline!\nShould be 'deadline /by YYYY-MM-DD HHmm'."); /** Deadline of the deadline. */ - private final LocalDate deadline; + private final LocalDateTime deadline; /** * Constructor for a deadline that takes in description and deadline. @@ -24,7 +24,7 @@ public class Deadline extends Task { * @param description Description of a deadline. * @param deadline Deadline of a deadline. */ - public Deadline(String description, LocalDate deadline) { + public Deadline(String description, LocalDateTime deadline) { super(description); this.deadline = deadline; } @@ -38,7 +38,7 @@ public Deadline(String description, LocalDate deadline) { * @return Deadline object with the given parameters. */ public static Deadline create(String done, String description, String date) { - Deadline deadline = new Deadline(description, LocalDate.parse(date)); + Deadline deadline = new Deadline(description, LocalDateTime.parse(date)); if (done.equals("1")) { deadline.markAsDone(); } @@ -61,7 +61,7 @@ public String getFileFormat() { */ @Override public String toString() { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy HH:mm"); String deadline = this.deadline.format(formatter); return String.format("[D]%s (by: %s)", super.toString(), deadline); } diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index 1fc4534eb0..28494939eb 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -1,6 +1,6 @@ package duke.task; -import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import duke.exceptions.DukeException; @@ -12,10 +12,10 @@ public class Event extends Task { /** Exception due to wrong event format. */ public static final DukeException WRONG_FORMAT = - new DukeException("Wrong format for Event!\nShould be 'event /at YYYY-MM-DD'."); + new DukeException("Wrong format for Event!\nShould be 'event /at YYYY-MM-DD HHmm'."); /** Date of the event. */ - private final LocalDate date; + private final LocalDateTime date; /** * Constructor for an event that takes in description and date. @@ -24,7 +24,7 @@ public class Event extends Task { * @param description Description of an event. * @param date Date of an event. */ - public Event(String description, LocalDate date) { + public Event(String description, LocalDateTime date) { super(description); this.date = date; } @@ -38,7 +38,7 @@ public Event(String description, LocalDate date) { * @return Event object with the given parameters. */ public static Event create(String done, String description, String date) { - Event event = new Event(description, LocalDate.parse(date)); + Event event = new Event(description, LocalDateTime.parse(date)); if (done.equals("1")) { event.markAsDone(); } @@ -61,7 +61,7 @@ public String getFileFormat() { */ @Override public String toString() { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd MMM yy HH:mm"); String date = this.date.format(formatter); return String.format("[E]%s (at: %s)", super.toString(), date); } diff --git a/src/test/java/duke/parser/ParserTest.java b/src/test/java/duke/parser/ParserTest.java index 0ef3c3ccc8..10c8bd5f78 100644 --- a/src/test/java/duke/parser/ParserTest.java +++ b/src/test/java/duke/parser/ParserTest.java @@ -51,7 +51,7 @@ public void parseCommand_todoCommand_parsedCorrectly() { @Test public void parseCommand_deadlineCommand_parsedCorrectly() { - parseCommandAndAssert("deadline abc /by 2100-01-01", DeadlineCommand.class); + parseCommandAndAssert("deadline abc /by 2100-01-01 0000", DeadlineCommand.class); } @Test @@ -61,7 +61,7 @@ public void parseCommand_deadlineCommandMissingDate_errorMessage() { @Test public void parseCommand_eventCommand_parsedCorrectly() { - parseCommandAndAssert("event abc /at 2100-01-01", EventCommand.class); + parseCommandAndAssert("event abc /at 2100-01-01 2359", EventCommand.class); } @Test diff --git a/src/test/java/duke/task/DeadlineTest.java b/src/test/java/duke/task/DeadlineTest.java index 5bb6374f76..c516789b33 100644 --- a/src/test/java/duke/task/DeadlineTest.java +++ b/src/test/java/duke/task/DeadlineTest.java @@ -7,39 +7,39 @@ public class DeadlineTest { @Test public void create_notDoneString_createdCorrectly() { - Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); - assertEquals("[D][ ] abc (by: 01 Jan 40)", deadline.toString()); + Deadline deadline = Deadline.create("0", "abc", "2040-01-01T00:00"); + assertEquals("[D][ ] abc (by: 01 Jan 40 00:00)", deadline.toString()); } @Test public void create_doneString_createdCorrectly() { - Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); - assertEquals("[D][X] abc (by: 01 Jan 40)", deadline.toString()); + Deadline deadline = Deadline.create("1", "abc", "2040-01-01T00:00"); + assertEquals("[D][X] abc (by: 01 Jan 40 00:00)", deadline.toString()); } @Test public void fileFormat_notDone_formattedCorrectly() { - Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); - assertEquals("D | 0 | abc | 2040-01-01", deadline.getFileFormat()); + Deadline deadline = Deadline.create("0", "abc", "2040-01-01T00:00"); + assertEquals("D | 0 | abc | 2040-01-01T00:00", deadline.getFileFormat()); } @Test public void fileFormat_done_formattedCorrectly() { - Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); - assertEquals("D | 1 | abc | 2040-01-01", deadline.getFileFormat()); + Deadline deadline = Deadline.create("1", "abc", "2040-01-01T00:00"); + assertEquals("D | 1 | abc | 2040-01-01T00:00", deadline.getFileFormat()); } @Test public void markAsDone_done_changedCorrectly() { - Deadline deadline = Deadline.create("0", "abc", "2040-01-01"); + Deadline deadline = Deadline.create("0", "abc", "2040-01-01T00:00"); deadline.markAsDone(); - assertEquals("[D][X] abc (by: 01 Jan 40)", deadline.toString()); + assertEquals("[D][X] abc (by: 01 Jan 40 00:00)", deadline.toString()); } @Test public void markAsUndone_undone_changedCorrectly() { - Deadline deadline = Deadline.create("1", "abc", "2040-01-01"); + Deadline deadline = Deadline.create("1", "abc", "2040-01-01T00:00"); deadline.markAsUndone(); - assertEquals("[D][ ] abc (by: 01 Jan 40)", deadline.toString()); + assertEquals("[D][ ] abc (by: 01 Jan 40 00:00)", deadline.toString()); } } diff --git a/src/test/java/duke/task/EventTest.java b/src/test/java/duke/task/EventTest.java index 372e849991..e3b87a5813 100644 --- a/src/test/java/duke/task/EventTest.java +++ b/src/test/java/duke/task/EventTest.java @@ -7,39 +7,39 @@ public class EventTest { @Test public void create_notDoneString_createdCorrectly() { - Event event = Event.create("0", "abc", "2040-01-01"); - assertEquals("[E][ ] abc (at: 01 Jan 40)", event.toString()); + Event event = Event.create("0", "abc", "2040-01-01T00:00"); + assertEquals("[E][ ] abc (at: 01 Jan 40 00:00)", event.toString()); } @Test public void create_doneString_createdCorrectly() { - Event event = Event.create("1", "abc", "2040-01-01"); - assertEquals("[E][X] abc (at: 01 Jan 40)", event.toString()); + Event event = Event.create("1", "abc", "2040-01-01T00:00"); + assertEquals("[E][X] abc (at: 01 Jan 40 00:00)", event.toString()); } @Test public void fileFormat_notDone_formattedCorrectly() { - Event event = Event.create("0", "abc", "2040-01-01"); - assertEquals("E | 0 | abc | 2040-01-01", event.getFileFormat()); + Event event = Event.create("0", "abc", "2040-01-01T00:00"); + assertEquals("E | 0 | abc | 2040-01-01T00:00", event.getFileFormat()); } @Test public void fileFormat_done_formattedCorrectly() { - Event event = Event.create("1", "abc", "2040-01-01"); - assertEquals("E | 1 | abc | 2040-01-01", event.getFileFormat()); + Event event = Event.create("1", "abc", "2040-01-01T00:00"); + assertEquals("E | 1 | abc | 2040-01-01T00:00", event.getFileFormat()); } @Test public void markAsDone_done_changedCorrectly() { - Event event = Event.create("0", "abc", "2040-01-01"); + Event event = Event.create("0", "abc", "2040-01-01T00:00"); event.markAsDone(); - assertEquals("[E][X] abc (at: 01 Jan 40)", event.toString()); + assertEquals("[E][X] abc (at: 01 Jan 40 00:00)", event.toString()); } @Test public void markAsUndone_undone_changedCorrectly() { - Event event = Event.create("1", "abc", "2040-01-01"); + Event event = Event.create("1", "abc", "2040-01-01T00:00"); event.markAsUndone(); - assertEquals("[E][ ] abc (at: 01 Jan 40)", event.toString()); + assertEquals("[E][ ] abc (at: 01 Jan 40 00:00)", event.toString()); } } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 17b8d5ee7a..55c9a2ac13 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -16,11 +16,11 @@ [T][X] read book ____________________________________________________________ Added this deadline! - [D][ ] return book (by: 29 Jun 22) + [D][ ] return book (by: 29 Jun 22 23:59) Now you have 2 tasks. ____________________________________________________________ Added this event! - [E][ ] project meeting (at: 06 Aug 22) + [E][ ] project meeting (at: 06 Aug 22 00:00) Now you have 3 tasks. ____________________________________________________________ Added this todo! @@ -35,48 +35,48 @@ Now you have 5 tasks. ____________________________________________________________ 1: [T][X] read book - 2: [D][ ] return book (by: 29 Jun 22) - 3: [E][ ] project meeting (at: 06 Aug 22) + 2: [D][ ] return book (by: 29 Jun 22 23:59) + 3: [E][ ] project meeting (at: 06 Aug 22 00:00) 4: [T][X] join sports club 5: [T][ ] borrow book ____________________________________________________________ Added this deadline! - [D][ ] return book 2 (by: 15 Oct 19) + [D][ ] return book 2 (by: 15 Oct 19 12:00) Now you have 6 tasks. ____________________________________________________________ Added this event! - [E][ ] project meeting (at: 15 Oct 22) + [E][ ] project meeting (at: 15 Oct 22 12:34) Now you have 7 tasks. ____________________________________________________________ 1: [T][X] read book - 2: [D][ ] return book (by: 29 Jun 22) - 3: [E][ ] project meeting (at: 06 Aug 22) + 2: [D][ ] return book (by: 29 Jun 22 23:59) + 3: [E][ ] project meeting (at: 06 Aug 22 00:00) 4: [T][X] join sports club 5: [T][ ] borrow book - 6: [D][ ] return book 2 (by: 15 Oct 19) - 7: [E][ ] project meeting (at: 15 Oct 22) + 6: [D][ ] return book 2 (by: 15 Oct 19 12:00) + 7: [E][ ] project meeting (at: 15 Oct 22 12:34) ____________________________________________________________ Description of Todo cannot be empty! ____________________________________________________________ Description of Todo cannot be empty! ____________________________________________________________ Wrong format for Deadline! - Should be 'deadline /by YYYY-MM-DD'. + Should be 'deadline /by YYYY-MM-DD HHmm'. ____________________________________________________________ Wrong format for Deadline! - Should be 'deadline /by YYYY-MM-DD'. + Should be 'deadline /by YYYY-MM-DD HHmm'. ____________________________________________________________ Wrong format for Deadline! - Should be 'deadline /by YYYY-MM-DD'. + Should be 'deadline /by YYYY-MM-DD HHmm'. ____________________________________________________________ Wrong format for Event! - Should be 'event /at YYYY-MM-DD'. + Should be 'event /at YYYY-MM-DD HHmm'. ____________________________________________________________ Wrong format for Event! - Should be 'event /at YYYY-MM-DD'. + Should be 'event /at YYYY-MM-DD HHmm'. ____________________________________________________________ Wrong format for Event! - Should be 'event /at YYYY-MM-DD'. + Should be 'event /at YYYY-MM-DD HHmm'. ____________________________________________________________ Unknown command! ____________________________________________________________ @@ -87,14 +87,14 @@ Now you have 6 tasks left. ____________________________________________________________ Removing this task! - [D][ ] return book (by: 29 Jun 22) + [D][ ] return book (by: 29 Jun 22 23:59) Now you have 5 tasks left. ____________________________________________________________ - 1: [E][ ] project meeting (at: 06 Aug 22) + 1: [E][ ] project meeting (at: 06 Aug 22 00:00) 2: [T][X] join sports club 3: [T][ ] borrow book - 4: [D][ ] return book 2 (by: 15 Oct 19) - 5: [E][ ] project meeting (at: 15 Oct 22) + 4: [D][ ] return book 2 (by: 15 Oct 19 12:00) + 5: [E][ ] project meeting (at: 15 Oct 22 12:34) ____________________________________________________________ Bye, hope to see you soon! ____________________________________________________________ diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 564995c715..735063da00 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,13 +1,13 @@ todo read book mark 1 -deadline return book /by 2022-06-29 -event project meeting /at 2022-08-06 +deadline return book /by 2022-06-29 2359 +event project meeting /at 2022-08-06 0000 todo join sports club mark 4 todo borrow book list -deadline return book 2 /by 2019-10-15 -event project meeting /at 2022-10-15 +deadline return book 2 /by 2019-10-15 1200 +event project meeting /at 2022-10-15 1234 list todo todo diff --git a/text-ui-test/runtest.sh b/text-ui-test/runtest.sh index 0a1ff2cf41..c51de96082 100755 --- a/text-ui-test/runtest.sh +++ b/text-ui-test/runtest.sh @@ -23,7 +23,7 @@ fi rm -f data/tasks # 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 +java -classpath ../bin duke/Duke < input.txt > ACTUAL.TXT # convert to UNIX format cp EXPECTED.TXT EXPECTED-UNIX.TXT From 793e73d996658d090c0fe19752d38c0fcd41965b Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Thu, 25 Aug 2022 21:24:24 +0800 Subject: [PATCH 44/65] Fix minor coding standard violations Remove unnecessary this keyword. Use @inheritDoc. --- src/main/java/duke/Duke.java | 26 +++++++++---------- .../java/duke/commands/CommandResult.java | 6 ++--- .../java/duke/commands/DeadlineCommand.java | 10 +++---- .../java/duke/commands/DeleteCommand.java | 15 +++++------ src/main/java/duke/commands/EventCommand.java | 12 ++++----- src/main/java/duke/commands/ExitCommand.java | 4 +-- src/main/java/duke/commands/FindCommand.java | 12 ++++----- src/main/java/duke/commands/ListCommand.java | 8 +++--- src/main/java/duke/commands/MarkCommand.java | 13 ++++------ src/main/java/duke/commands/TodoCommand.java | 12 ++++----- .../java/duke/commands/UnmarkCommand.java | 13 ++++------ src/main/java/duke/task/Deadline.java | 2 +- src/main/java/duke/task/Event.java | 2 +- src/main/java/duke/task/Task.java | 14 +++++----- src/main/java/duke/task/TaskList.java | 10 +++---- src/main/java/duke/ui/Ui.java | 10 +++---- 16 files changed, 74 insertions(+), 95 deletions(-) diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index f3aa2efda3..11f2551aa4 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -25,16 +25,16 @@ public class Duke { * Constructor for a Duke application instance. */ public Duke() { - this.parser = new Parser(); - this.storage = new Storage("data", "data/tasks"); - this.ui = new Ui(); + parser = new Parser(); + storage = new Storage("data", "data/tasks"); + ui = new Ui(); TaskList tasks; try { // Attempt to load tasks from storage. - tasks = this.storage.load(); + tasks = storage.load(); } catch (DukeException e) { - this.ui.showErrorMessage(e); + ui.showErrorMessage(e); // Load empty list if fail to load from storage. tasks = new TaskList(); } @@ -46,14 +46,14 @@ public Duke() { */ public void run() { Scanner scanner = new Scanner(System.in); - this.ui.showWelcomeMessage(); + ui.showWelcomeMessage(); while (scanner.hasNext()) { try { String userInput = scanner.nextLine(); - Command command = this.parser.parseCommand(userInput); + Command command = parser.parseCommand(userInput); // Populate command with tasks. - command.setData(this.tasks); + command.setData(tasks); CommandResult result = command.execute(); if (result.shouldExit()) { // Exit application by exiting the scan loop. @@ -61,18 +61,18 @@ public void run() { } if (result.shouldUpdateFile()) { // Save to storage. - this.storage.save(this.tasks); + storage.save(tasks); } - this.ui.showResult(result); + ui.showResult(result); } catch (DukeException | IOException e) { - this.ui.showErrorMessage(e); + ui.showErrorMessage(e); } catch (NumberFormatException e) { // Handles case where user inputs an invalid number. - this.ui.showErrorMessage("Invalid number!"); + ui.showErrorMessage("Invalid number!"); } } - this.ui.showGoodbyeMessage(); + ui.showGoodbyeMessage(); // Close scanner. scanner.close(); } diff --git a/src/main/java/duke/commands/CommandResult.java b/src/main/java/duke/commands/CommandResult.java index 41ec975875..041cd70e8e 100644 --- a/src/main/java/duke/commands/CommandResult.java +++ b/src/main/java/duke/commands/CommandResult.java @@ -27,7 +27,7 @@ public CommandResult(String userMessage, boolean hasUpdates, boolean isExit) { * @return User message. */ public String getUserMessage() { - return this.userMessage; + return userMessage; } /** @@ -36,7 +36,7 @@ public String getUserMessage() { * @return Whether there are any updates to the file. */ public boolean shouldUpdateFile() { - return this.hasUpdates; + return hasUpdates; } /** @@ -45,6 +45,6 @@ public boolean shouldUpdateFile() { * @return Whether the application should exit. */ public boolean shouldExit() { - return this.isExit; + return isExit; } } diff --git a/src/main/java/duke/commands/DeadlineCommand.java b/src/main/java/duke/commands/DeadlineCommand.java index db1c700926..f63aed87d5 100644 --- a/src/main/java/duke/commands/DeadlineCommand.java +++ b/src/main/java/duke/commands/DeadlineCommand.java @@ -49,15 +49,13 @@ public DeadlineCommand(String arguments) throws DukeException { } /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ @Override public CommandResult execute() { - this.tasks.addTask(this.deadline); - int numberOfTasks = this.tasks.size(); - String userMessage = String.format(USER_MESSAGE_FORMAT, this.deadline, numberOfTasks); + tasks.addTask(deadline); + int numberOfTasks = tasks.size(); + String userMessage = String.format(USER_MESSAGE_FORMAT, deadline, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/DeleteCommand.java b/src/main/java/duke/commands/DeleteCommand.java index 64db40eb05..a7bd495846 100644 --- a/src/main/java/duke/commands/DeleteCommand.java +++ b/src/main/java/duke/commands/DeleteCommand.java @@ -18,25 +18,22 @@ public class DeleteCommand extends Command { * @param arguments Arguments string is to be of the format "N". */ public DeleteCommand(String arguments) { - this.index = Integer.parseInt(arguments); + index = Integer.parseInt(arguments); } /** - * Executes the command. - * - * @return Result of the execution. - * @throws DukeException Exception that occurred during the execution of the command. + * {@inheritDoc} */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. - if (this.index <= 0 || this.index > this.tasks.size()) { + if (index <= 0 || index > tasks.size()) { throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.getTask(this.index - 1); - this.tasks.removeTask(this.index - 1); - int numberOfTasks = this.tasks.size(); + Task task = tasks.getTask(index - 1); + tasks.removeTask(index - 1); + int numberOfTasks = tasks.size(); String userMessage = String.format(USER_MESSAGE_FORMAT, task, numberOfTasks); return new CommandResult(userMessage, true, false); } diff --git a/src/main/java/duke/commands/EventCommand.java b/src/main/java/duke/commands/EventCommand.java index 0ae8d72681..ad25e7576a 100644 --- a/src/main/java/duke/commands/EventCommand.java +++ b/src/main/java/duke/commands/EventCommand.java @@ -45,19 +45,17 @@ public EventCommand(String arguments) throws DukeException { throw DukeException.INVALID_DATE; } - this.event = new Event(description, localDateTime); + event = new Event(description, localDateTime); } /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ @Override public CommandResult execute() { - this.tasks.addTask(this.event); - int numberOfTasks = this.tasks.size(); - String userMessage = String.format(USER_MESSAGE_FORMAT, this.event, numberOfTasks); + tasks.addTask(event); + int numberOfTasks = tasks.size(); + String userMessage = String.format(USER_MESSAGE_FORMAT, event, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/ExitCommand.java b/src/main/java/duke/commands/ExitCommand.java index b104ad0711..f451311a93 100644 --- a/src/main/java/duke/commands/ExitCommand.java +++ b/src/main/java/duke/commands/ExitCommand.java @@ -8,9 +8,7 @@ public class ExitCommand extends Command { public static final String COMMAND_WORD = "bye"; /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ public CommandResult execute() { return new CommandResult("", false, true); diff --git a/src/main/java/duke/commands/FindCommand.java b/src/main/java/duke/commands/FindCommand.java index 673180853b..303507aee3 100644 --- a/src/main/java/duke/commands/FindCommand.java +++ b/src/main/java/duke/commands/FindCommand.java @@ -20,21 +20,19 @@ public class FindCommand extends Command { * @param arguments Arguments string is the find keyword. */ public FindCommand(String arguments) { - this.keyword = arguments; + keyword = arguments; } /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ @Override public CommandResult execute() { ArrayList foundTasks = new ArrayList<>(); - for (int i = 0; i < this.tasks.size(); i++) { - Task task = this.tasks.getTask(i); - if (task.containsKeyword(this.keyword)) { + for (int i = 0; i < tasks.size(); i++) { + Task task = tasks.getTask(i); + if (task.containsKeyword(keyword)) { String taskString = String.format(TASK_FORMAT, i + 1, task); foundTasks.add(taskString); } diff --git a/src/main/java/duke/commands/ListCommand.java b/src/main/java/duke/commands/ListCommand.java index ac9ea1472a..82d566a750 100644 --- a/src/main/java/duke/commands/ListCommand.java +++ b/src/main/java/duke/commands/ListCommand.java @@ -9,16 +9,14 @@ public class ListCommand extends Command { private static final String LINE_FORMAT = "%d: %s"; /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ @Override public CommandResult execute() { - String[] lines = new String[this.tasks.size()]; + String[] lines = new String[tasks.size()]; for (int i = 0; i < tasks.size(); i++) { - lines[i] = String.format(LINE_FORMAT, i + 1, this.tasks.getTask(i)); + lines[i] = String.format(LINE_FORMAT, i + 1, tasks.getTask(i)); } String userMessage = String.join("\n", lines); diff --git a/src/main/java/duke/commands/MarkCommand.java b/src/main/java/duke/commands/MarkCommand.java index 6e87082bc5..4f1cedab12 100644 --- a/src/main/java/duke/commands/MarkCommand.java +++ b/src/main/java/duke/commands/MarkCommand.java @@ -18,25 +18,22 @@ public class MarkCommand extends Command { * @param arguments Arguments string is to be of the format "N". */ public MarkCommand(String arguments) { - this.index = Integer.parseInt(arguments); + index = Integer.parseInt(arguments); } /** - * Executes the command. - * - * @return Result of the execution. - * @throws DukeException Exception that occurred during the execution of the command. + * {@inheritDoc} */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. - if (this.index <= 0 || this.index > this.tasks.size()) { + if (index <= 0 || index > tasks.size()) { throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.getTask(this.index - 1); + Task task = tasks.getTask(index - 1); task.markAsDone(); - String userMessage = String.format(USER_MESSAGE_FORMAT, this.index, task); + String userMessage = String.format(USER_MESSAGE_FORMAT, index, task); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/TodoCommand.java b/src/main/java/duke/commands/TodoCommand.java index 0027372cb0..fb828cdb17 100644 --- a/src/main/java/duke/commands/TodoCommand.java +++ b/src/main/java/duke/commands/TodoCommand.java @@ -23,19 +23,17 @@ public TodoCommand(String arguments) throws DukeException { throw Todo.EMPTY_DESCRIPTION; } - this.todo = new Todo(arguments); + todo = new Todo(arguments); } /** - * Executes the command. - * - * @return Result of the execution. + * {@inheritDoc} */ @Override public CommandResult execute() { - this.tasks.addTask(this.todo); - int numberOfTasks = this.tasks.size(); - String userMessage = String.format(USER_MESSAGE_FORMAT, this.todo, numberOfTasks); + tasks.addTask(todo); + int numberOfTasks = tasks.size(); + String userMessage = String.format(USER_MESSAGE_FORMAT, todo, numberOfTasks); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/commands/UnmarkCommand.java b/src/main/java/duke/commands/UnmarkCommand.java index a974511d2a..697414267b 100644 --- a/src/main/java/duke/commands/UnmarkCommand.java +++ b/src/main/java/duke/commands/UnmarkCommand.java @@ -17,25 +17,22 @@ public class UnmarkCommand extends Command { * @param arguments Arguments string is to be of the format "N". */ public UnmarkCommand(String arguments) { - this.index = Integer.parseInt(arguments); + index = Integer.parseInt(arguments); } /** - * Executes the command. - * - * @return Result of the execution. - * @throws DukeException Exception that occurred during the execution of the command. + * {@inheritDoc} */ @Override public CommandResult execute() throws DukeException { // Check if index is out of bounds. - if (this.index <= 0 || this.index > this.tasks.size()) { + if (index <= 0 || index > tasks.size()) { throw DukeException.INVALID_INDEX; } // Subtract 1 to account for 0-index data structure. - Task task = this.tasks.getTask(this.index - 1); + Task task = tasks.getTask(index - 1); task.markAsUndone(); - String userMessage = String.format(USER_MESSAGE_FORMAT, this.index, task); + String userMessage = String.format(USER_MESSAGE_FORMAT, index, task); return new CommandResult(userMessage, true, false); } } diff --git a/src/main/java/duke/task/Deadline.java b/src/main/java/duke/task/Deadline.java index 2b2d0e890e..53f69eb379 100644 --- a/src/main/java/duke/task/Deadline.java +++ b/src/main/java/duke/task/Deadline.java @@ -51,7 +51,7 @@ public static Deadline create(String done, String description, String date) { * @return Deadline in file saving format. */ public String getFileFormat() { - return String.format("D | %s | %s", super.getFileFormat(), this.deadline); + return String.format("D | %s | %s", super.getFileFormat(), deadline); } /** diff --git a/src/main/java/duke/task/Event.java b/src/main/java/duke/task/Event.java index 28494939eb..0e671253d6 100644 --- a/src/main/java/duke/task/Event.java +++ b/src/main/java/duke/task/Event.java @@ -51,7 +51,7 @@ public static Event create(String done, String description, String date) { * @return Event in file saving format. */ public String getFileFormat() { - return String.format("E | %s | %s", super.getFileFormat(), this.date); + return String.format("E | %s | %s", super.getFileFormat(), date); } /** diff --git a/src/main/java/duke/task/Task.java b/src/main/java/duke/task/Task.java index 645fd93b16..65148b33c5 100644 --- a/src/main/java/duke/task/Task.java +++ b/src/main/java/duke/task/Task.java @@ -17,21 +17,21 @@ public abstract class Task { */ protected Task(String description) { this.description = description; - this.isDone = false; + isDone = false; } /** * Marks a task as done. */ public void markAsDone() { - this.isDone = true; + isDone = true; } /** * Marks a task as undone. */ public void markAsUndone() { - this.isDone = false; + isDone = false; } /** @@ -41,7 +41,7 @@ public void markAsUndone() { * @return True if task contains keyword. */ public boolean containsKeyword(String keyword) { - return this.description.contains(keyword); + return description.contains(keyword); } /** @@ -50,7 +50,7 @@ public boolean containsKeyword(String keyword) { * @return The task in file saving format. */ public String getFileFormat() { - return String.format("%s | %s", this.isDone ? "1" : "0", this.description); + return String.format("%s | %s", isDone ? "1" : "0", description); } /** @@ -60,7 +60,7 @@ public String getFileFormat() { */ @Override public String toString() { - String doneIcon = this.isDone ? "X" : " "; - return String.format("[%s] %s", doneIcon, this.description); + String doneIcon = isDone ? "X" : " "; + return String.format("[%s] %s", doneIcon, description); } } diff --git a/src/main/java/duke/task/TaskList.java b/src/main/java/duke/task/TaskList.java index dcebec39a8..b7b05e6803 100644 --- a/src/main/java/duke/task/TaskList.java +++ b/src/main/java/duke/task/TaskList.java @@ -12,7 +12,7 @@ public class TaskList { * Constructor to create an empty task list. */ public TaskList() { - this.tasks = new ArrayList<>(); + tasks = new ArrayList<>(); } /** @@ -21,7 +21,7 @@ public TaskList() { * @param task Task to be added. */ public void addTask(Task task) { - this.tasks.add(task); + tasks.add(task); } /** @@ -30,7 +30,7 @@ public void addTask(Task task) { * @param index Index of task to be removed. */ public void removeTask(int index) { - this.tasks.remove(index); + tasks.remove(index); } /** @@ -40,7 +40,7 @@ public void removeTask(int index) { * @return The task to be retrieved. */ public Task getTask(int index) { - return this.tasks.get(index); + return tasks.get(index); } /** @@ -49,6 +49,6 @@ public Task getTask(int index) { * @return The size of the task list. */ public int size() { - return this.tasks.size(); + return tasks.size(); } } diff --git a/src/main/java/duke/ui/Ui.java b/src/main/java/duke/ui/Ui.java index 8b9301be3a..0eb42855d7 100644 --- a/src/main/java/duke/ui/Ui.java +++ b/src/main/java/duke/ui/Ui.java @@ -27,7 +27,7 @@ public void show(String... messages) { * Shows the welcome message to the user. */ public void showWelcomeMessage() { - this.show( + show( HORIZONTAL_LINE, "Hello I'm", "____ _ ", @@ -45,7 +45,7 @@ public void showWelcomeMessage() { * Shows the goodbye message to the user. */ public void showGoodbyeMessage() { - this.show( + show( "Bye, hope to see you soon!", HORIZONTAL_LINE ); @@ -57,7 +57,7 @@ public void showGoodbyeMessage() { * @param message Error message to be shown to the user. */ public void showErrorMessage(String message) { - this.show( + show( message, HORIZONTAL_LINE ); @@ -69,7 +69,7 @@ public void showErrorMessage(String message) { * @param exception Exception to be shown to the user. */ public void showErrorMessage(Exception exception) { - this.showErrorMessage(exception.getMessage()); + showErrorMessage(exception.getMessage()); } /** @@ -78,6 +78,6 @@ public void showErrorMessage(Exception exception) { * @param result Result to be shown to the user. */ public void showResult(CommandResult result) { - this.show(result.getUserMessage(), HORIZONTAL_LINE); + show(result.getUserMessage(), HORIZONTAL_LINE); } } From 3d3b3987b2dd926724642320429646554622d433 Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Sat, 27 Aug 2022 12:38:55 +0800 Subject: [PATCH 45/65] Add basic JavaFX GUI Also, remove text based UI and tests --- build.gradle | 20 +++- src/main/java/duke/Duke.java | 69 +++++-------- src/main/java/duke/Launcher.java | 17 ++++ src/main/java/duke/Main.java | 39 ++++++++ src/main/java/duke/commands/FindCommand.java | 9 +- src/main/java/duke/ui/DialogBox.java | 73 ++++++++++++++ src/main/java/duke/ui/MainWindow.java | 69 +++++++++++++ src/main/java/duke/ui/Ui.java | 83 --------------- src/main/resources/images/DaDuke.png | Bin 0 -> 32657 bytes src/main/resources/images/DaUser.jpeg | Bin 0 -> 93625 bytes src/main/resources/view/DialogBox.fxml | 18 ++++ src/main/resources/view/MainWindow.fxml | 20 ++++ text-ui-test/EXPECTED.TXT | 100 ------------------- text-ui-test/input.txt | 25 ----- text-ui-test/runtest.bat | 21 ---- text-ui-test/runtest.sh | 41 -------- 16 files changed, 284 insertions(+), 320 deletions(-) create mode 100644 src/main/java/duke/Launcher.java create mode 100644 src/main/java/duke/Main.java create mode 100644 src/main/java/duke/ui/DialogBox.java create mode 100644 src/main/java/duke/ui/MainWindow.java delete mode 100644 src/main/java/duke/ui/Ui.java create mode 100644 src/main/resources/images/DaDuke.png create mode 100644 src/main/resources/images/DaUser.jpeg create mode 100644 src/main/resources/view/DialogBox.fxml create mode 100644 src/main/resources/view/MainWindow.fxml delete mode 100644 text-ui-test/EXPECTED.TXT delete mode 100644 text-ui-test/input.txt delete mode 100644 text-ui-test/runtest.bat delete mode 100755 text-ui-test/runtest.sh diff --git a/build.gradle b/build.gradle index 29a37084e3..782e35bdc8 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,21 @@ repositories { 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' + + String javaFxVersion = '11' + + implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win' + implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac' + implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux' + implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win' + implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac' + implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux' + implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win' + implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac' + implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux' + implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win' + implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac' + implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux' } test { @@ -29,12 +44,11 @@ test { } application { - mainClassName = "duke.Duke" + mainClassName = "duke.Launcher" } shadowJar { - archiveBaseName = "duke" - archiveClassifier = null + archiveFileName.set("duke.jar") } checkstyle { diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index 11f2551aa4..e1af569cef 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -1,7 +1,6 @@ package duke; import java.io.IOException; -import java.util.Scanner; import duke.commands.Command; import duke.commands.CommandResult; @@ -9,16 +8,15 @@ import duke.parser.Parser; import duke.storage.Storage; import duke.task.TaskList; -import duke.ui.Ui; +import javafx.application.Platform; /** - * Main entry point of the Duke application. - * Initializes the application and is responsible for user interaction. + * Represents the Duke application. + * Responsible for user interaction. */ public class Duke { private final Parser parser; private final Storage storage; - private final Ui ui; private final TaskList tasks; /** @@ -27,14 +25,13 @@ public class Duke { public Duke() { parser = new Parser(); storage = new Storage("data", "data/tasks"); - ui = new Ui(); TaskList tasks; try { // Attempt to load tasks from storage. tasks = storage.load(); } catch (DukeException e) { - ui.showErrorMessage(e); + e.printStackTrace(); // Load empty list if fail to load from storage. tasks = new TaskList(); } @@ -42,47 +39,27 @@ public Duke() { } /** - * Runs the Duke application and handles user interaction. + * Gets the response from the Duke application based on a particular input. + * + * @param input User input provided. + * @return Response from the Duke application. */ - public void run() { - Scanner scanner = new Scanner(System.in); - ui.showWelcomeMessage(); - - while (scanner.hasNext()) { - try { - String userInput = scanner.nextLine(); - Command command = parser.parseCommand(userInput); - // Populate command with tasks. - command.setData(tasks); - CommandResult result = command.execute(); - if (result.shouldExit()) { - // Exit application by exiting the scan loop. - break; - } - if (result.shouldUpdateFile()) { - // Save to storage. - storage.save(tasks); - } - ui.showResult(result); - } catch (DukeException | IOException e) { - ui.showErrorMessage(e); - } catch (NumberFormatException e) { - // Handles case where user inputs an invalid number. - ui.showErrorMessage("Invalid number!"); + public String getResponse(String input) { + try { + Command command = parser.parseCommand(input); + // Populate command with tasks. + command.setData(tasks); + CommandResult result = command.execute(); + if (result.shouldExit()) { + Platform.exit(); } + if (result.shouldUpdateFile()) { + // Save to storage. + storage.save(tasks); + } + return result.getUserMessage(); + } catch (DukeException | IOException e) { + return e.getMessage(); } - - ui.showGoodbyeMessage(); - // Close scanner. - scanner.close(); - } - - /** - * Entry point of the application. - * - * @param args Args is ignored. - */ - public static void main(String[] args) { - new Duke().run(); } } diff --git a/src/main/java/duke/Launcher.java b/src/main/java/duke/Launcher.java new file mode 100644 index 0000000000..d0a6fc9782 --- /dev/null +++ b/src/main/java/duke/Launcher.java @@ -0,0 +1,17 @@ +package duke; + +import javafx.application.Application; + +/** + * The launcher for launching the Duke application. + * Used as a workaround for classpath issues. + */ +public class Launcher { + /** + * Entrypoint to the Duke application. + * @param args Arguments for duke application. + */ + public static void main(String[] args) { + Application.launch(Main.class, args); + } +} diff --git a/src/main/java/duke/Main.java b/src/main/java/duke/Main.java new file mode 100644 index 0000000000..f8ec7e66d6 --- /dev/null +++ b/src/main/java/duke/Main.java @@ -0,0 +1,39 @@ +package duke; + +import java.io.IOException; + +import duke.ui.MainWindow; +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.scene.Scene; +import javafx.scene.layout.AnchorPane; +import javafx.stage.Stage; + +/** + * A GUI for Duke using FXML. + */ +public class Main extends Application { + private final Duke duke = new Duke(); + + /** + * Starts the GUI for the Stage that takes in a stage. + * + * @param stage the primary stage for this application, onto which + * the application scene can be set. + * Applications may create other stages, if needed, but they will not be + * primary stages. + */ + @Override + public void start(Stage stage) { + try { + FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("/view/MainWindow.fxml")); + AnchorPane anchorPane = fxmlLoader.load(); + Scene scene = new Scene(anchorPane); + stage.setScene(scene); + fxmlLoader.getController().setDuke(duke); + stage.show(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/duke/commands/FindCommand.java b/src/main/java/duke/commands/FindCommand.java index 303507aee3..d23a58deba 100644 --- a/src/main/java/duke/commands/FindCommand.java +++ b/src/main/java/duke/commands/FindCommand.java @@ -2,6 +2,7 @@ import java.util.ArrayList; +import duke.exceptions.DukeException; import duke.task.Task; /** @@ -12,14 +13,20 @@ public class FindCommand extends Command { public static final String COMMAND_WORD = "find"; private static final String TASK_FORMAT = "%d: %s"; private static final String USER_MESSAGE_FORMAT = "Here are the matching tasks in your list!\n%s"; + private static final DukeException WRONG_FORMAT = + new DukeException("Wrong format for Find!\nShould be 'find '."); private final String keyword; /** * Constructor for a delete command that takes in arguments. * * @param arguments Arguments string is the find keyword. + * @throws DukeException Exception due to invalid arguments. */ - public FindCommand(String arguments) { + public FindCommand(String arguments) throws DukeException { + if (arguments.isEmpty()) { + throw WRONG_FORMAT; + } keyword = arguments; } diff --git a/src/main/java/duke/ui/DialogBox.java b/src/main/java/duke/ui/DialogBox.java new file mode 100644 index 0000000000..f1238914e6 --- /dev/null +++ b/src/main/java/duke/ui/DialogBox.java @@ -0,0 +1,73 @@ +package duke.ui; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.fxml.FXML; +import javafx.geometry.Pos; +import javafx.scene.Node; +import javafx.scene.control.Label; +import javafx.scene.image.Image; +import javafx.scene.image.ImageView; +import javafx.scene.layout.HBox; + +/** + * Controller for the dialog box of the Duke application. + */ +public class DialogBox extends HBox { + @FXML + private final Label text; + @FXML + private final ImageView displayImage; + + /** + * Private constructor for a dialog box that takes in a label and an image. + * + * @param label Label to be shown in the dialog box. + * @param image Image to be shown in the dialog box. + */ + private DialogBox(String label, Image image) { + text = new Label(label); + displayImage = new ImageView(image); + + text.setWrapText(true); + displayImage.setFitWidth(100.0f); + displayImage.setFitHeight(100.0f); + + setAlignment(Pos.TOP_RIGHT); + getChildren().addAll(text, displayImage); + } + + /** + * Flips the dialog box so that the image is to the left of the text. + */ + private void flip() { + setAlignment(Pos.TOP_LEFT); + ObservableList tmp = FXCollections.observableArrayList(this.getChildren()); + FXCollections.reverse(tmp); + getChildren().setAll(tmp); + } + + /** + * Factory method to create a user dialog box. + * + * @param label User's text to be shown. + * @param image User's image to be shown. + * @return User dialog box. + */ + public static DialogBox getUserDialog(String label, Image image) { + return new DialogBox(label, image); + } + + /** + * Factory method to create a duke dialog box. + * + * @param label Duke's text to be shown. + * @param image Duke's image to be shown. + * @return Duke dialog box. + */ + public static DialogBox getDukeDialog(String label, Image image) { + DialogBox dialogBox = new DialogBox(label, image); + dialogBox.flip(); + return dialogBox; + } +} diff --git a/src/main/java/duke/ui/MainWindow.java b/src/main/java/duke/ui/MainWindow.java new file mode 100644 index 0000000000..e3bd5b3ab9 --- /dev/null +++ b/src/main/java/duke/ui/MainWindow.java @@ -0,0 +1,69 @@ +package duke.ui; + +import java.util.Objects; + +import duke.Duke; +import javafx.fxml.FXML; +import javafx.scene.control.Button; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.TextField; +import javafx.scene.image.Image; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.VBox; + +/** + * Controller for the main window of the Duke application. + * This provides the layout for the other controls. + */ +public class MainWindow extends AnchorPane { + @FXML + private ScrollPane scrollPane; + @FXML + private VBox dialogContainer; + @FXML + private TextField userInput; + @FXML + private Button sendButton; + + private Duke duke; + + private final Image userImage = new Image( + Objects.requireNonNull(this.getClass().getResourceAsStream("/images/DaUser.jpeg")) + ); + private final Image dukeImage = new Image( + Objects.requireNonNull(this.getClass().getResourceAsStream("/images/DaDuke.png")) + ); + + /** + * Initializes the main window. + */ + @FXML + public void initialize() { + scrollPane.vvalueProperty().bind(dialogContainer.heightProperty()); + } + + /** + * Sets the Duke instance for the main window. + * + * @param duke Duke instance associated with the main window. + */ + public void setDuke(Duke duke) { + this.duke = duke; + } + + /** + * Creates two dialog boxes, one for the user and one for Duke application + * and then appends them to the dialog container. Clears the user input after processing. + */ + @FXML + private void handleUserInput() { + String input = userInput.getText(); + String response = duke.getResponse(input); + dialogContainer.getChildren().addAll( + DialogBox.getUserDialog(input, userImage), + DialogBox.getDukeDialog(response, dukeImage) + ); + // Clear user input; + userInput.clear(); + } +} diff --git a/src/main/java/duke/ui/Ui.java b/src/main/java/duke/ui/Ui.java deleted file mode 100644 index 0eb42855d7..0000000000 --- a/src/main/java/duke/ui/Ui.java +++ /dev/null @@ -1,83 +0,0 @@ -package duke.ui; - -import duke.commands.CommandResult; - -/** - * Represents the UI in the Duke application. - * Responsible for displaying text output to the user. - */ -public class Ui { - private static final String INDENTATION = " "; - private static final String HORIZONTAL_LINE = "____________________________________________________________"; - private static final String LINE_SEPARATOR = System.lineSeparator(); - - /** - * Show messages to the user. - * - * @param messages List of messages to be shown. - */ - public void show(String... messages) { - for (String m : messages) { - // Formats message. - System.out.println(INDENTATION + m.replace("\n", LINE_SEPARATOR + INDENTATION)); - } - } - - /** - * Shows the welcome message to the user. - */ - public void showWelcomeMessage() { - show( - HORIZONTAL_LINE, - "Hello I'm", - "____ _ ", - "| _ \\ _ _| | _____ ", - "| | | | | | | |/ / _ \\", - "| |_| | |_| | < __/", - "|____/ \\__,_|_|\\_\\___|", - "", - "What can I do for you?", - HORIZONTAL_LINE - ); - } - - /** - * Shows the goodbye message to the user. - */ - public void showGoodbyeMessage() { - show( - "Bye, hope to see you soon!", - HORIZONTAL_LINE - ); - } - - /** - * Shows an error message to the user. - * - * @param message Error message to be shown to the user. - */ - public void showErrorMessage(String message) { - show( - message, - HORIZONTAL_LINE - ); - } - - /** - * Shows an exception's message to the user. - * - * @param exception Exception to be shown to the user. - */ - public void showErrorMessage(Exception exception) { - showErrorMessage(exception.getMessage()); - } - - /** - * Shows a result's message to the user. - * - * @param result Result to be shown to the user. - */ - public void showResult(CommandResult result) { - show(result.getUserMessage(), HORIZONTAL_LINE); - } -} diff --git a/src/main/resources/images/DaDuke.png b/src/main/resources/images/DaDuke.png new file mode 100644 index 0000000000000000000000000000000000000000..d893658717e29b50b4ceedada235d9f75835a118 GIT binary patch literal 32657 zcmV)5K*_&}P)Zf>Tg`t%N;{PE9Y2%-o7`CdniQG#9szpJX+ zcrVK`zK7pG^!n{1T{qo3os(XNkTqW0IXIfGihv^wpO4cHg6YjrzS7VYZJZVWev% z!fK9RcD(ntf zCxMCmC7oRZecuOe6J~p&f5@?I;U2zE;O2T?Vy_8UZ1S4i=b>l%q0jeYAI+i(>K zsIun-!&|SPodfa+5u7Z5yhtd`XRjxuF+Ww~1H4xg)(?GXYLo{q2VPiixh(3*`0iyFHj`V{p-_+Q4jWKC=o6ohr zW)q;Nb7IxtY}qD4RyBpAMv`rR!YytU)sgEIa8F)wX(O<=RwjYY+sLdy0`5o0>=a zd(GePvuhIc}2|`2Y7OgN%4u~XV>q*3e$65qJ;}bK0Li-Wh%~iQn_FhV_*O6|& z$E%S!>BN;~l+|jbw5B2<783HDuPYE-T1Z)&EZTFhZGIj)nseO*|7}7`Vz4%vMl&l& z!c*D(>n3|ulhD`D1FzG)Tik79GgrpJ#HE0O)y{gM#c%L1=xtu`A<9oj(;}Q6cpHb= zIjOSNTO3vD|G|N_tH+^nj?I`D4+@;j;9`s4!*lY>X2_|khHWO LGkWs%c&z?S( zPOmG=sXyYzEkG{@&pHB0HHfww6VcVi^7l(QuBHDI@ z=z!4KIw#Y$TO%d>y$0`GT4%|@#g%h$ep*7T=|XpM<1RVOFse4=Z(K81Zub1MpUC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