From 556af3f47a96b32898ab4cdbd65b16486a4871e8 Mon Sep 17 00:00:00 2001 From: damithc Date: Mon, 25 May 2020 00:58:18 +0800 Subject: [PATCH 01/35] 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 c053b7165a2b0ddb5a47bd437dc86181eff9a09d Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Wed, 17 Aug 2022 20:59:14 +0800 Subject: [PATCH 02/35] Level-1 --- src/main/java/Duke.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5d313334cc..0d61a571ee 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -1,10 +1,16 @@ +import java.util.Scanner; + public class Duke { public static void main(String[] args) { - String logo = " ____ _ \n" - + "| _ \\ _ _| | _____ \n" - + "| | | | | | | |/ / _ \\\n" - + "| |_| | |_| | < __/\n" - + "|____/ \\__,_|_|\\_\\___|\n"; - System.out.println("Hello from\n" + logo); + Scanner reply = new Scanner(System.in); + System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + + String currreply = reply.nextLine(); + + while (!currreply.equals("bye")) { + System.out.println(currreply + "\n"); + currreply = reply.nextLine(); + } + System.out.println("Bye. Hope to see you again soon!"); } } From a4b55e753b8901ea31fb60fd452f9805d0aab8b8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Wed, 17 Aug 2022 21:42:09 +0800 Subject: [PATCH 03/35] Level-2 --- src/main/java/Duke.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 0d61a571ee..c465b1b397 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 { @@ -6,10 +7,18 @@ public static void main(String[] args) { System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); String currreply = reply.nextLine(); + ArrayList list = new ArrayList<>(100); while (!currreply.equals("bye")) { - System.out.println(currreply + "\n"); - currreply = reply.nextLine(); + if (currreply.equals("list")) { + list.forEach(n -> System.out.println((list.indexOf(n) + 1) + ". " + n)); + System.out.println("\n"); + currreply = reply.nextLine(); + } else { + list.add(currreply); + System.out.println("added: " + currreply + "\n"); + currreply = reply.nextLine(); + } } System.out.println("Bye. Hope to see you again soon!"); } From fd5961d017d4fcc1d25e268a83fdca9b227934a3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Wed, 17 Aug 2022 22:34:07 +0800 Subject: [PATCH 04/35] Level-3 --- src/main/java/Duke.java | 57 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index c465b1b397..54c6fd15d0 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -6,20 +6,69 @@ public static void main(String[] args) { Scanner reply = new Scanner(System.in); System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + class Task { + protected String description; + protected boolean isDone; + + public Task(String description) { + this.description = description; + this.isDone = false; + } + + public void isMark(boolean bool) { + this.isDone = bool; + } + + public String getDescription() { + return this.description; + } + + public String getStatusIcon() { + return (isDone ? "X" : " "); // mark done task with X + } + } + String currreply = reply.nextLine(); - ArrayList list = new ArrayList<>(100); + Task currtask = new Task(currreply); + ArrayList list = new ArrayList<>(100); while (!currreply.equals("bye")) { if (currreply.equals("list")) { - list.forEach(n -> System.out.println((list.indexOf(n) + 1) + ". " + n)); - System.out.println("\n"); + System.out.println("Here are the tasks in your list:"); + list.forEach(n -> System.out.println((list.indexOf(n) + 1) + ".[" + + n.getStatusIcon() + "] " + n.getDescription())); + System.out.println(); + currreply = reply.nextLine(); + } else if (currreply.startsWith("mark")) { + int index = Integer.parseInt(currreply.substring(5)) - 1; + if (index > list.size() - 1) { + System.out.println("You have no such tasks.\n"); + } else { + Task task = list.get(index); + task.isMark(true); + System.out.println("Nice! I've marked this task as done:\n" + + " [X] " + task.getDescription() + "\n"); + } + currreply = reply.nextLine(); + } else if (currreply.startsWith("unmark")) { + int index = Integer.parseInt(currreply.substring(7)) - 1; + if (index > list.size() - 1) { + System.out.println("You have no such tasks.\n"); + } else { + Task task = list.get(index); + task.isMark(false); + System.out.println("OK, I've marked this task as not done yet:\n" + + " [ ] " + task.getDescription() + "\n"); + } currreply = reply.nextLine(); } else { - list.add(currreply); + list.add(currtask); System.out.println("added: " + currreply + "\n"); currreply = reply.nextLine(); + currtask = new Task(currreply); } } System.out.println("Bye. Hope to see you again soon!"); } + } From d21e760da9d2616755be168e54b45685b99635f9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Thu, 18 Aug 2022 00:12:25 +0800 Subject: [PATCH 05/35] Level-4 --- src/main/java/Duke.java | 79 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 9 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 54c6fd15d0..9fb72518ef 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -9,34 +9,71 @@ public static void main(String[] args) { class Task { protected String description; protected boolean isDone; + protected int type; + protected String date; - public Task(String description) { + public Task(String description, int type) { this.description = description; this.isDone = false; + this.type = type; } public void isMark(boolean bool) { this.isDone = bool; } + public String getType() { + if (this.type == 0) { + return "[T]"; + } else if (this.type == 1) { + return "[D]"; + } else { + return "[E]"; + } + } + public String getDescription() { return this.description; } + public void setDate(String str) { + this.date = str; + } + + public String getDate() { + if (this.type == 0) { + String str = "There is no date."; + return str; + } + return this.date; + } + public String getStatusIcon() { return (isDone ? "X" : " "); // mark done task with X } + + public String toString() { + if (type == 0) { + return "[T][" + this.getStatusIcon() + "] " + + this.description; + } else if (type == 1) { + return "[D][" + this.getStatusIcon() + "] " + + this.description + " (by: " + this.date + ")"; + } else { + return "[E][" + this.getStatusIcon() + "] " + + this.description + " (at: " + this.date + ")"; + } + } } String currreply = reply.nextLine(); - Task currtask = new Task(currreply); ArrayList list = new ArrayList<>(100); while (!currreply.equals("bye")) { if (currreply.equals("list")) { System.out.println("Here are the tasks in your list:"); - list.forEach(n -> System.out.println((list.indexOf(n) + 1) + ".[" - + n.getStatusIcon() + "] " + n.getDescription())); + list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." + + n.toString())); System.out.println(); currreply = reply.nextLine(); } else if (currreply.startsWith("mark")) { @@ -47,7 +84,7 @@ public String getStatusIcon() { Task task = list.get(index); task.isMark(true); System.out.println("Nice! I've marked this task as done:\n" + - " [X] " + task.getDescription() + "\n"); + " " + task.getType() + "[X] " + task.getDescription() + "\n"); } currreply = reply.nextLine(); } else if (currreply.startsWith("unmark")) { @@ -58,14 +95,38 @@ public String getStatusIcon() { Task task = list.get(index); task.isMark(false); System.out.println("OK, I've marked this task as not done yet:\n" + - " [ ] " + task.getDescription() + "\n"); + " " + task.getType() + "[ ] " + task.getDescription() + "\n"); } currreply = reply.nextLine(); } else { - list.add(currtask); - System.out.println("added: " + currreply + "\n"); + if (currreply.startsWith("todo")) { + String acttask = currreply.substring(5); + Task currtask = new Task(acttask, 0); + currtask.setDate(null); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } else if (currreply.startsWith("deadline")) { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(9, slashindex - 1); + Task currtask = new Task(acttask, 1); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } else if (currreply.startsWith("event")) { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(6, slashindex - 1); + Task currtask = new Task(acttask, 2); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } currreply = reply.nextLine(); - currtask = new Task(currreply); } } System.out.println("Bye. Hope to see you again soon!"); From 5397e2ca117e4bc07af1cb55c02fe10036dc5c28 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Thu, 18 Aug 2022 02:12:38 +0800 Subject: [PATCH 06/35] A-TextUiTesting --- text-ui-test/EXPECTED.TXT | 32 ++++++++++++++++++++++++++------ text-ui-test/input.txt | 7 +++++++ text-ui-test/runtest.bat | 2 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 657e74f6e7..ac86c3fe7f 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -1,7 +1,27 @@ -Hello from - ____ _ -| _ \ _ _| | _____ -| | | | | | | |/ / _ \ -| |_| | |_| | < __/ -|____/ \__,_|_|\_\___| +Hello! I'm Duke +What can I do for you? +Got it. I've added this task: + [T][ ] borrow book +Now you have 1 tasks in the list. + +Got it. I've added this task: + [D][ ] return book (by: Sunday) +Now you have 2 tasks in the list. + +Got it. I've added this task: + [E][ ] project meeting (at: Mon 2-4pm) +Now you have 3 tasks in the list. + +Here are the tasks in your list: +1.[T][ ] borrow book +2.[D][ ] return book (by: Sunday) +3.[E][ ] project meeting (at: Mon 2-4pm) + +Nice! I've marked this task as done: + [T][X] borrow book + +OK, I've marked this task as not done yet: + [T][ ] borrow book + +Bye. Hope to see you again soon! \ No newline at end of file diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index e69de29bb2..6c165b97ad 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -0,0 +1,7 @@ +todo borrow book +deadline return book /by Sunday +event project meeting /at Mon 2-4pm +list +mark 1 +unmark 1 +bye \ No newline at end of file diff --git a/text-ui-test/runtest.bat b/text-ui-test/runtest.bat index 0873744649..b730857deb 100644 --- a/text-ui-test/runtest.bat +++ b/text-ui-test/runtest.bat @@ -7,7 +7,7 @@ REM delete output from previous run if exist ACTUAL.TXT del ACTUAL.TXT REM compile the code into the bin folder -javac -cp ..\src\main\java -Xlint:none -d ..\bin ..\src\main\java\*.java +javac -cp ..\src\main\java\Duke -Xlint:none -d ..\bin ..\src\main\java\*.java IF ERRORLEVEL 1 ( echo ********** BUILD FAILURE ********** exit /b 1 From bf91f2efabefa548d64f081dab52740a48782559 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Thu, 18 Aug 2022 02:18:37 +0800 Subject: [PATCH 07/35] Level-5 --- src/main/java/Duke.java | 60 ++++++++++++++++++++++++--------------- text-ui-test/EXPECTED.TXT | 4 +++ text-ui-test/input.txt | 2 ++ 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 9fb72518ef..6b6b30a1f1 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -100,31 +100,45 @@ public String toString() { currreply = reply.nextLine(); } else { if (currreply.startsWith("todo")) { - String acttask = currreply.substring(5); - Task currtask = new Task(acttask, 0); - currtask.setDate(null); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (currreply.length() <= 4) { + System.out.println("☹ OOPS!!! The description of a todo cannot be empty.\n"); + } else { + String acttask = currreply.substring(5); + Task currtask = new Task(acttask, 0); + currtask.setDate(null); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } } else if (currreply.startsWith("deadline")) { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(9, slashindex - 1); - Task currtask = new Task(acttask, 1); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (currreply.length() <= 8) { + System.out.println("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } else { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(9, slashindex - 1); + Task currtask = new Task(acttask, 1); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } } else if (currreply.startsWith("event")) { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(6, slashindex - 1); - Task currtask = new Task(acttask, 2); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (currreply.length() <= 5) { + System.out.println("☹ OOPS!!! The description of a event cannot be empty.\n"); + } else { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(6, slashindex - 1); + Task currtask = new Task(acttask, 2); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } + } else { + System.out.println("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); } currreply = reply.nextLine(); } diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index ac86c3fe7f..908b3793f9 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -24,4 +24,8 @@ Nice! I've marked this task as done: OK, I've marked this task as not done yet: [T][ ] borrow book +☹ OOPS!!! The description of a todo cannot be empty. + +☹ OOPS!!! I'm sorry, but I don't know what that means :-( + Bye. Hope to see you again soon! \ No newline at end of file diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index 6c165b97ad..f6ddcd389d 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -4,4 +4,6 @@ event project meeting /at Mon 2-4pm list mark 1 unmark 1 +todo +blah bye \ No newline at end of file From 6badea537eb2562ef37937dfc2cde3163d344ee3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Thu, 18 Aug 2022 02:37:44 +0800 Subject: [PATCH 08/35] Level-6 --- src/main/java/Duke.java | 64 +++++++++++++++++++++++++++------------ text-ui-test/EXPECTED.TXT | 4 +++ text-ui-test/input.txt | 1 + 3 files changed, 49 insertions(+), 20 deletions(-) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 6b6b30a1f1..4f201d9690 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -71,10 +71,14 @@ public String toString() { while (!currreply.equals("bye")) { if (currreply.equals("list")) { - System.out.println("Here are the tasks in your list:"); - list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." - + n.toString())); - System.out.println(); + if (list.size() == 0) { + System.out.println("There are no tasks in your list. :)"); + } else { + System.out.println("Here are the tasks in your list:"); + list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." + + n.toString())); + System.out.println(); + } currreply = reply.nextLine(); } else if (currreply.startsWith("mark")) { int index = Integer.parseInt(currreply.substring(5)) - 1; @@ -98,6 +102,18 @@ public String toString() { " " + task.getType() + "[ ] " + task.getDescription() + "\n"); } currreply = reply.nextLine(); + } else if (currreply.startsWith("delete")) { + int index = Integer.parseInt(currreply.substring(7)) - 1; + if (index > list.size() - 1) { + System.out.println("You have no such tasks.\n"); + } else { + Task task = list.get(index); + list.remove(index); + System.out.println("Noted. I've removed this task:\n" + + " " + task.toString() + "\n" + "Now you have " + + list.size() + " tasks in the list.\n"); + } + currreply = reply.nextLine(); } else { if (currreply.startsWith("todo")) { if (currreply.length() <= 4) { @@ -115,27 +131,35 @@ public String toString() { if (currreply.length() <= 8) { System.out.println("☹ OOPS!!! The description of a deadline cannot be empty.\n"); } else { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(9, slashindex - 1); - Task currtask = new Task(acttask, 1); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (!currreply.contains("/")) { + System.out.println("There is no date! >:(\n"); + } else { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(9, slashindex - 1); + Task currtask = new Task(acttask, 1); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } } } else if (currreply.startsWith("event")) { if (currreply.length() <= 5) { System.out.println("☹ OOPS!!! The description of a event cannot be empty.\n"); } else { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(6, slashindex - 1); - Task currtask = new Task(acttask, 2); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (!currreply.contains("/")) { + System.out.println("There is no date! >:(\n"); + } else { + int slashindex = currreply.indexOf("/"); + String acttask = currreply.substring(6, slashindex - 1); + Task currtask = new Task(acttask, 2); + currtask.setDate(currreply.substring(slashindex + 4)); + list.add(currtask); + System.out.println("Got it. I've added this task:\n" + + " " + currtask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + } } } else { System.out.println("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 908b3793f9..829d932cd0 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -28,4 +28,8 @@ OK, I've marked this task as not done yet: ☹ OOPS!!! I'm sorry, but I don't know what that means :-( +Noted. I've removed this task: + [T][ ] borrow book +Now you have 2 tasks in the list. + Bye. Hope to see you again soon! \ No newline at end of file diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index f6ddcd389d..a11480c663 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -6,4 +6,5 @@ mark 1 unmark 1 todo blah +delete 1 bye \ No newline at end of file From 32ff66321583cd2d6d6ee707ca52632d6fa59a36 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sat, 27 Aug 2022 03:16:58 +0800 Subject: [PATCH 09/35] Amend to OOP new head branch --- src/main/java/Deadline.java | 24 +++ src/main/java/Duke.java | 283 +++++++++++++++---------------- src/main/java/DukeException.java | 12 ++ src/main/java/Event.java | 24 +++ src/main/java/Task.java | 25 +++ src/main/java/Todo.java | 22 +++ 6 files changed, 247 insertions(+), 143 deletions(-) create mode 100644 src/main/java/Deadline.java create mode 100644 src/main/java/DukeException.java create mode 100644 src/main/java/Event.java create mode 100644 src/main/java/Task.java create mode 100644 src/main/java/Todo.java diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java new file mode 100644 index 0000000000..dcbb82a841 --- /dev/null +++ b/src/main/java/Deadline.java @@ -0,0 +1,24 @@ +public class Deadline extends Task{ + protected String description; + protected boolean isDone; + protected String date; + + public Deadline(String description, String date) { + this.description = description; + this.date = date; + } + + public void isMark(boolean bool) { + this.isDone = bool; + } + + public String getStatusIcon() { + return (isDone ? "X" : " "); // mark done task with X + } + + @Override + public String toString() { + return "[D][" + this.getStatusIcon() + "] " + + this.description + " (by: " + this.date + ")"; + } +} diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 4f201d9690..9e47d44372 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -6,165 +6,162 @@ public static void main(String[] args) { Scanner reply = new Scanner(System.in); System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); - class Task { - protected String description; - protected boolean isDone; - protected int type; - protected String date; + String currReply = reply.nextLine(); + ArrayList list = new ArrayList(100); - public Task(String description, int type) { - this.description = description; - this.isDone = false; - this.type = type; - } - - public void isMark(boolean bool) { - this.isDone = bool; - } - - public String getType() { - if (this.type == 0) { - return "[T]"; - } else if (this.type == 1) { - return "[D]"; - } else { - return "[E]"; - } - } - - public String getDescription() { - return this.description; - } - - public void setDate(String str) { - this.date = str; - } - - public String getDate() { - if (this.type == 0) { - String str = "There is no date."; - return str; - } - return this.date; - } - - public String getStatusIcon() { - return (isDone ? "X" : " "); // mark done task with X - } - - public String toString() { - if (type == 0) { - return "[T][" + this.getStatusIcon() + "] " + - this.description; - } else if (type == 1) { - return "[D][" + this.getStatusIcon() + "] " + - this.description + " (by: " + this.date + ")"; - } else { - return "[E][" + this.getStatusIcon() + "] " + - this.description + " (at: " + this.date + ")"; - } - } - } - - String currreply = reply.nextLine(); - ArrayList list = new ArrayList<>(100); - - while (!currreply.equals("bye")) { - if (currreply.equals("list")) { - if (list.size() == 0) { - System.out.println("There are no tasks in your list. :)"); - } else { - System.out.println("Here are the tasks in your list:"); - list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." - + n.toString())); - System.out.println(); - } - currreply = reply.nextLine(); - } else if (currreply.startsWith("mark")) { - int index = Integer.parseInt(currreply.substring(5)) - 1; - if (index > list.size() - 1) { - System.out.println("You have no such tasks.\n"); - } else { - Task task = list.get(index); - task.isMark(true); - System.out.println("Nice! I've marked this task as done:\n" + - " " + task.getType() + "[X] " + task.getDescription() + "\n"); - } - currreply = reply.nextLine(); - } else if (currreply.startsWith("unmark")) { - int index = Integer.parseInt(currreply.substring(7)) - 1; - if (index > list.size() - 1) { - System.out.println("You have no such tasks.\n"); - } else { - Task task = list.get(index); - task.isMark(false); - System.out.println("OK, I've marked this task as not done yet:\n" + - " " + task.getType() + "[ ] " + task.getDescription() + "\n"); + while (!currReply.equals("bye")) { + if (currReply.equals("list")) { + try { + if (list.size() == 0) { + throw new DukeException("There are no tasks in your list. :)"); + } else { + System.out.println("Here are the tasks in your list:"); + list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." + + n.toString())); + System.out.println(); + currReply = reply.nextLine(); + continue; + } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; } - currreply = reply.nextLine(); - } else if (currreply.startsWith("delete")) { - int index = Integer.parseInt(currreply.substring(7)) - 1; - if (index > list.size() - 1) { - System.out.println("You have no such tasks.\n"); - } else { - Task task = list.get(index); - list.remove(index); - System.out.println("Noted. I've removed this task:\n" + - " " + task.toString() + "\n" + "Now you have " + - list.size() + " tasks in the list.\n"); + } else if (currReply.startsWith("mark")) { + int index = Integer.parseInt(currReply.substring(5)) - 1; + try { + if (index > list.size() - 1) { + throw new DukeException("You have no such tasks."); + } else { + Task task = list.get(index); + task.isMark(true); + System.out.println("Nice! I've marked this task as done:\n" + + " " + task.toString() + "\n"); + currReply = reply.nextLine(); + continue; + } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; } - currreply = reply.nextLine(); - } else { - if (currreply.startsWith("todo")) { - if (currreply.length() <= 4) { - System.out.println("☹ OOPS!!! The description of a todo cannot be empty.\n"); + } else if (currReply.startsWith("unmark")) { + int index = Integer.parseInt(currReply.substring(7)) - 1; + try { + if (index > list.size() - 1) { + throw new DukeException("You have no such tasks."); } else { - String acttask = currreply.substring(5); - Task currtask = new Task(acttask, 0); - currtask.setDate(null); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + Task task = list.get(index); + task.isMark(false); + System.out.println("OK, I've marked this task as not done yet:\n" + + " " + task.toString() + "\n"); + currReply = reply.nextLine(); + continue; } - } else if (currreply.startsWith("deadline")) { - if (currreply.length() <= 8) { - System.out.println("☹ OOPS!!! The description of a deadline cannot be empty.\n"); + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; + } + } else if (currReply.startsWith("delete")) { + int index = Integer.parseInt(currReply.substring(7)) - 1; + try { + if (index > list.size() - 1) { + throw new DukeException("You have no such tasks."); } else { - if (!currreply.contains("/")) { - System.out.println("There is no date! >:(\n"); + Task task = list.get(index); + list.remove(index); + System.out.println("Noted. I've removed this task:\n" + + " " + task.toString() + "\n" + "Now you have " + + list.size() + " tasks in the list.\n"); + currReply = reply.nextLine(); + continue; + } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; + } + } else { + if (currReply.startsWith("todo")) { + try { + if (currReply.length() <= 4) { + throw new DukeException("The description of a todo cannot be empty."); } else { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(9, slashindex - 1); - Task currtask = new Task(acttask, 1); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); + String actTask = currReply.substring(5); + Task currTask = new Todo(actTask); + list.add(currTask); System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + + " " + currTask.toString() + "\n" + "Now you have " + list.size() + " tasks in the list.\n"); + currReply = reply.nextLine(); + continue; } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; } - } else if (currreply.startsWith("event")) { - if (currreply.length() <= 5) { - System.out.println("☹ OOPS!!! The description of a event cannot be empty.\n"); - } else { - if (!currreply.contains("/")) { - System.out.println("There is no date! >:(\n"); + } else if (currReply.startsWith("deadline")) { + try { + if (currReply.length() <= 8) { + throw new DukeException("The description of a deadline cannot be empty."); } else { - int slashindex = currreply.indexOf("/"); - String acttask = currreply.substring(6, slashindex - 1); - Task currtask = new Task(acttask, 2); - currtask.setDate(currreply.substring(slashindex + 4)); - list.add(currtask); - System.out.println("Got it. I've added this task:\n" + - " " + currtask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); + if (!currReply.contains("/")) { + System.out.println("There is no date! >:(\n"); + } else { + int slashIndex = currReply.indexOf("/"); + String actTask = currReply.substring(9, slashIndex - 1); + String taskDate = currReply.substring(slashIndex + 4); + Task currTask = new Deadline(actTask, taskDate); + list.add(currTask); + System.out.println("Got it. I've added this task:\n" + + " " + currTask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + currReply = reply.nextLine(); + continue; + } } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; + } + } else if (currReply.startsWith("event")) { + try { + if (currReply.length() <= 5) { + throw new DukeException("The description of a event cannot be empty."); + } else { + if (!currReply.contains("/")) { + throw new DukeException("There is no date! >:("); + } else { + int slashIndex = currReply.indexOf("/"); + String actTask = currReply.substring(6, slashIndex - 1); + String taskDate = currReply.substring(slashIndex + 4); + Task currTask = new Event(actTask, taskDate); + list.add(currTask); + System.out.println("Got it. I've added this task:\n" + + " " + currTask.toString() + "\n" + + "Now you have " + list.size() + " tasks in the list.\n"); + currReply = reply.nextLine(); + continue; + } + } + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; } } else { - System.out.println("☹ OOPS!!! I'm sorry, but I don't know what that means :-(\n"); + try { + throw new DukeException("I'm sorry, but I don't know what that means :-("); + } catch (DukeException e) { + System.out.println(e.toString()); + currReply = reply.nextLine(); + continue; + } } - currreply = reply.nextLine(); + currReply = reply.nextLine(); } } System.out.println("Bye. Hope to see you again soon!"); diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java new file mode 100644 index 0000000000..1bb2316089 --- /dev/null +++ b/src/main/java/DukeException.java @@ -0,0 +1,12 @@ +public class DukeException extends IllegalArgumentException{ + protected String message; + + public DukeException(String message) { + this.message = message; + } + + @Override + public String toString() { + return "☹ OOPS!!! " + this.message + "\n"; + } +} diff --git a/src/main/java/Event.java b/src/main/java/Event.java new file mode 100644 index 0000000000..c290871803 --- /dev/null +++ b/src/main/java/Event.java @@ -0,0 +1,24 @@ +public class Event extends Task{ + protected String description; + protected boolean isDone; + protected String date; + + public Event(String description, String date) { + this.description = description; + this.date = date; + } + + public void isMark(boolean bool) { + this.isDone = bool; + } + + public String getStatusIcon() { + return (isDone ? "X" : " "); // mark done task with X + } + + @Override + public String toString() { + return "[E][" + this.getStatusIcon() + "] " + + this.description + " (at: " + this.date + ")"; + } +} diff --git a/src/main/java/Task.java b/src/main/java/Task.java new file mode 100644 index 0000000000..07984cfe63 --- /dev/null +++ b/src/main/java/Task.java @@ -0,0 +1,25 @@ +public class Task { + protected String description; + protected boolean isDone; + protected String date; + + public void isMark(boolean bool) { + this.isDone = bool; + } + + public String getDescription() { + return this.description; + } + + public void setDate(String str) { + this.date = str; + } + + public String getStatusIcon() { + return (isDone ? "X" : " "); // mark done task with X + } + + public String toString() { + return this.description; + } +} diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java new file mode 100644 index 0000000000..95d4590495 --- /dev/null +++ b/src/main/java/Todo.java @@ -0,0 +1,22 @@ +public class Todo extends Task { + protected String description; + protected boolean isDone; + + public Todo(String description) { + this.description = description; + } + + public void isMark(boolean bool) { + this.isDone = bool; + } + + public String getStatusIcon() { + return (isDone ? "X" : " "); // mark done task with X + } + + @Override + public String toString() { + return "[T][" + this.getStatusIcon() + "] " + + this.description; + } +} From 5b2ee85a00d27b67428497d210419c8fd3310f41 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sat, 27 Aug 2022 03:22:13 +0800 Subject: [PATCH 10/35] Add save feature --- data/duke.txt | 3 + src/main/java/Duke.java | 11 +++- src/main/java/FileData.java | 122 ++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 data/duke.txt create mode 100644 src/main/java/FileData.java diff --git a/data/duke.txt b/data/duke.txt new file mode 100644 index 0000000000..13ce499d0f --- /dev/null +++ b/data/duke.txt @@ -0,0 +1,3 @@ +[T][ ] read +[D][ ] reaad (by: sun) +[E][ ] read (at: sun) diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 9e47d44372..5bb465107a 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -6,8 +6,11 @@ public static void main(String[] args) { Scanner reply = new Scanner(System.in); System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + FileData f = new FileData("data/duke.txt"); + f.toPrint(); + String currReply = reply.nextLine(); - ArrayList list = new ArrayList(100); + ArrayList list = f.allTasks(); while (!currReply.equals("bye")) { if (currReply.equals("list")) { @@ -35,6 +38,7 @@ public static void main(String[] args) { } else { Task task = list.get(index); task.isMark(true); + f.updateData(list); System.out.println("Nice! I've marked this task as done:\n" + " " + task.toString() + "\n"); currReply = reply.nextLine(); @@ -53,6 +57,7 @@ public static void main(String[] args) { } else { Task task = list.get(index); task.isMark(false); + f.updateData(list); System.out.println("OK, I've marked this task as not done yet:\n" + " " + task.toString() + "\n"); currReply = reply.nextLine(); @@ -71,6 +76,7 @@ public static void main(String[] args) { } else { Task task = list.get(index); list.remove(index); + f.updateData(list); System.out.println("Noted. I've removed this task:\n" + " " + task.toString() + "\n" + "Now you have " + list.size() + " tasks in the list.\n"); @@ -91,6 +97,7 @@ public static void main(String[] args) { String actTask = currReply.substring(5); Task currTask = new Todo(actTask); list.add(currTask); + f.updateData(list); System.out.println("Got it. I've added this task:\n" + " " + currTask.toString() + "\n" + "Now you have " + list.size() + " tasks in the list.\n"); @@ -115,6 +122,7 @@ public static void main(String[] args) { String taskDate = currReply.substring(slashIndex + 4); Task currTask = new Deadline(actTask, taskDate); list.add(currTask); + f.updateData(list); System.out.println("Got it. I've added this task:\n" + " " + currTask.toString() + "\n" + "Now you have " + list.size() + " tasks in the list.\n"); @@ -140,6 +148,7 @@ public static void main(String[] args) { String taskDate = currReply.substring(slashIndex + 4); Task currTask = new Event(actTask, taskDate); list.add(currTask); + f.updateData(list); System.out.println("Got it. I've added this task:\n" + " " + currTask.toString() + "\n" + "Now you have " + list.size() + " tasks in the list.\n"); diff --git a/src/main/java/FileData.java b/src/main/java/FileData.java new file mode 100644 index 0000000000..c2b2f77cfa --- /dev/null +++ b/src/main/java/FileData.java @@ -0,0 +1,122 @@ +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Scanner; + +public class FileData { + protected String fileName; + protected File file; + protected ArrayList tasks; + + + public FileData(String fileName) { + this.fileName = fileName; + this.file = new File(fileName); + this.tasks = this.storeArray(); + } + + public boolean exists() { + return this.file.exists(); + } + + private static void writeToFile(String filePath, String textToAdd) throws IOException { + FileWriter fw = new FileWriter(filePath); + fw.write(textToAdd); + fw.close(); + } + + private static void appendToFile(String filePath, String textToAppend) throws IOException { + FileWriter fw = new FileWriter(filePath, true); // create a FileWriter in append mode + fw.write(textToAppend); + fw.close(); + } + + public void updateData(ArrayList tasks) { + int count = 0; + for (int i = 0; i < tasks.size(); i++) { + try { + if (i == 0) { + writeToFile(this.fileName, tasks.get(i).toString() + System.lineSeparator()); + } else { + storeData(tasks.get(i).toString()); + } + } catch (IOException e) { + System.out.println("Something went wrong: " + e.getMessage()); + } + } + } + + public ArrayList allTasks() { + return this.tasks; + } + + public ArrayList storeArray() { + ArrayList tasks = new ArrayList<>(100); + try { + if (!this.file.exists()) { + throw new FileNotFoundException(); + } else { + Scanner s = new Scanner(this.file); + while (s.hasNext()) { + String currTask = s.nextLine(); + char currType = currTask.charAt(1); + if (currType == 'T') { + tasks.add(new Todo(currTask.substring(7))); + } else if (currType == 'D') { + int bracketIndex = currTask.indexOf("("); + String taskDate = currTask.substring(bracketIndex + 4); + tasks.add(new Deadline(currTask.substring(7, bracketIndex - 1), taskDate)); + } else { + int bracketIndex = currTask.indexOf("("); + String taskDate = currTask.substring(bracketIndex + 4); + tasks.add(new Event(currTask.substring(7, bracketIndex - 1), taskDate)); + } + } + System.out.println(); + } + } catch (FileNotFoundException e) { + System.out.println("File not found!"); + System.out.println(); + } + return tasks; + } + + public void storeData(String textToStore) { + String file = this.fileName; + try { + appendToFile(file, textToStore + System.lineSeparator()); + } catch (IOException e) { + System.out.println("Something went wrong: " + e.getMessage()); + } + } + + public void toPrint() { + try { + if (!this.file.exists()) { + throw new FileNotFoundException(); + } else { + Scanner d = new Scanner(this.file); + while (d.hasNext()) { + System.out.println(d.nextLine()); + } + System.out.println(); + } + } catch (FileNotFoundException e) { + System.out.println("File not found!"); + System.out.println(); + } + } + + + public static void main(String[] args) { + File f = new File("data/duke.txt"); + File f1 = new File("data/tempDuke.txt"); + System.out.println("full path: " + f.getAbsolutePath()); + System.out.println("full path: " + f1.getAbsolutePath()); + System.out.println("file exists?: " + f.exists()); + System.out.println("is Directory?: " + f.isDirectory()); + } + +} From 97694907725c505e865d003523613c95e3066258 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sat, 27 Aug 2022 03:27:47 +0800 Subject: [PATCH 11/35] Add date and time format feature --- data/duke.txt | 3 + src/main/java/DateFormat.java | 287 ++++++++++++++++++++++++++++++++++ src/main/java/Deadline.java | 6 +- src/main/java/Duke.java | 2 +- src/main/java/Event.java | 6 +- 5 files changed, 297 insertions(+), 7 deletions(-) create mode 100644 data/duke.txt create mode 100644 src/main/java/DateFormat.java diff --git a/data/duke.txt b/data/duke.txt new file mode 100644 index 0000000000..13ce499d0f --- /dev/null +++ b/data/duke.txt @@ -0,0 +1,3 @@ +[T][ ] read +[D][ ] reaad (by: sun) +[E][ ] read (at: sun) diff --git a/src/main/java/DateFormat.java b/src/main/java/DateFormat.java new file mode 100644 index 0000000000..cf767bf6d8 --- /dev/null +++ b/src/main/java/DateFormat.java @@ -0,0 +1,287 @@ +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.util.HashMap; +import java.util.Locale; + + +public class DateFormat { + protected String date; + protected LocalDate dateFormatted; + protected String afterBy; + protected LocalTime timeFormatted; + protected String stringDate; + protected String stringTime; + protected LocalDateTime dateAndTime; + protected HashMap months = new HashMap(); + public DateFormat(String date) { + this.afterBy = date; + this.date = date; + this.dateFormatted = null; + this.timeFormatted = null; + + String day; + String month; + String year; + String hour; + String minutes; + String time = ""; + + months.put("JAN", "1"); + months.put("FEB", "2"); + months.put("MAR", "3"); + months.put("APR", "4"); + months.put("MAY", "5"); + months.put("JUN", "6"); + months.put("JUL", "7"); + months.put("AUG", "8"); + months.put("SEP", "9"); + months.put("OCT", "10"); + months.put("NOV", "11"); + months.put("DEC", "12"); + + + if (this.afterBy.contains("/")) { + if (this.afterBy.indexOf("/") < 2) { + int afterDaySlashIndex = afterBy.indexOf("/"); + String afterDay; + if (afterDaySlashIndex == 1) { + day = "0" + afterBy.charAt(0); + afterDay = afterBy.substring(afterDaySlashIndex + 1); + } else { + day = afterBy.substring(0, 2); + afterDay = afterBy.substring(afterDaySlashIndex + 2); + } + int afterMonthSlashIndex = afterDay.indexOf("/"); + String afterMonth; + if (afterMonthSlashIndex == 1) { + month = "0" + afterDay.charAt(0); + afterMonth = afterDay.substring(afterMonthSlashIndex + 1); + } else { + month = afterDay.substring(0, 2); + afterMonth = afterDay.substring(afterMonthSlashIndex + 2); + } + year = afterMonth.substring(0, 4); + if (afterMonth.length() > 4) { + time = afterMonth.substring(5); + } + } else if (afterBy.indexOf("/") == 3) { + month = afterBy.substring(0, 3); + int afterMonthSlashIndex = afterBy.indexOf("/"); + String afterMonth = afterBy.substring(afterMonthSlashIndex + 1); + int afterDaySlashIndex = afterMonth.indexOf("/"); + String afterDay; + if (afterDaySlashIndex == 1) { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + } + year = afterDay.substring(0, 4); + time = afterDay.substring(5); + } else { + year = afterBy.substring(0, 4); + int afterYearSlashIndex = afterBy.indexOf("/"); + String afterYear = afterBy.substring(afterYearSlashIndex + 1); + int afterMonthSlashIndex = afterYear.indexOf("/"); + String afterMonth; + if (afterMonthSlashIndex == 1) { + month = "0" + afterYear.charAt(0); + afterMonth = afterYear.substring(afterMonthSlashIndex + 1); + } else { + month = afterYear.substring(0, 2); + afterMonth = afterYear.substring(afterMonthSlashIndex + 2); + } + String afterDay; + if (afterMonth.charAt(1) == ' ') { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + } + time = afterDay; + } + } else if (this.afterBy.contains("-")) { + if (this.afterBy.indexOf("-") < 2) { + int afterDayDashIndex = afterBy.indexOf("-"); + String afterDay; + if (afterDayDashIndex == 1) { + day = "0" + afterBy.charAt(0); + afterDay = afterBy.substring(afterDayDashIndex + 1); + } else { + day = afterBy.substring(0, 2); + afterDay = afterBy.substring(afterDayDashIndex + 2); + } + int afterMonthDashIndex = afterDay.indexOf("-"); + String afterMonth; + if (afterMonthDashIndex == 1) { + month = "0" + afterDay.charAt(0); + afterMonth = afterDay.substring(afterMonthDashIndex + 1); + } else { + month = afterDay.substring(0, 2); + afterMonth = afterDay.substring(afterMonthDashIndex + 2); + } + year = afterMonth.substring(0, 4); + if (afterMonth.length() > 4) { + time = afterMonth.substring(5); + } + } else if (afterBy.indexOf("-") == 3) { + month = afterBy.substring(0, 3); + int afterMonthSlashIndex = afterBy.indexOf("-"); + String afterMonth = afterBy.substring(afterMonthSlashIndex + 1); + int afterDaySlashIndex = afterMonth.indexOf("-"); + String afterDay; + if (afterDaySlashIndex == 1) { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + } + year = afterDay.substring(0, 4); + time = afterDay.substring(5); + } else { + year = afterBy.substring(0, 4); + int afterYearDashIndex = afterBy.indexOf("-"); + String afterYear = afterBy.substring(afterYearDashIndex + 1); + int afterMonthSpaceIndex = afterYear.indexOf("-"); + String afterMonth; + if (afterMonthSpaceIndex == 1) { + month = "0" + afterYear.charAt(0); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); + } else { + month = afterYear.substring(0, 2); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 2); + } + String afterDay; + if (afterMonth.charAt(1) == ' ') { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 2); + } + if (afterDay.length() != 0) { + time = afterDay; + } + } + } else { + this.afterBy = this.afterBy.substring(1); + if (this.afterBy.indexOf(" ") < 2) { + int afterDaySpaceIndex = afterBy.indexOf(" "); + String afterDay; + if (afterDaySpaceIndex == 1) { + day = "0" + afterBy.charAt(0); + afterDay = afterBy.substring(afterDaySpaceIndex + 1); + } else { + day = afterBy.substring(0, 2); + afterDay = afterBy.substring(afterDaySpaceIndex + 2); + } + int afterMonthSpaceIndex = afterDay.indexOf(" "); + String afterMonth; + if (afterMonthSpaceIndex == 1) { + month = "0" + afterDay.charAt(0); + afterMonth = afterDay.substring(afterMonthSpaceIndex + 1); + } else { + month = afterDay.substring(0, 2); + afterMonth = afterDay.substring(afterMonthSpaceIndex + 2); + } + year = afterMonth.substring(0, 4); + if (afterMonth.length() > 4) { + time = afterMonth.substring(5); + } + month = months.get(month.toUpperCase()); + } else if (afterBy.indexOf(" ") == 3) { + month = afterBy.substring(0, 3); + int afterMonthSpaceIndex = afterBy.indexOf(" "); + String afterMonth = afterBy.substring(afterMonthSpaceIndex + 1); + int afterDaySpaceIndex = afterMonth.indexOf(" "); + String afterDay; + if (afterDaySpaceIndex == 1) { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterDaySpaceIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterDaySpaceIndex + 2); + } + year = afterDay.substring(0, 4); + time = afterDay.substring(5); + month = months.get(month.toUpperCase()); + } else { + year = afterBy.substring(0, 4); + int afterYearSpaceIndex = afterBy.indexOf(" "); + String afterYear = afterBy.substring(afterYearSpaceIndex + 1); + int afterMonthSpaceIndex = afterYear.indexOf(" "); + String afterMonth; + if (afterMonthSpaceIndex == 1) { + month = "0" + afterYear.charAt(0); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); + } else { + month = afterYear.substring(0, 2); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 2); + } + String afterDay; + if (afterMonth.charAt(1) == ' ') { + day = "0" + afterMonth.charAt(0); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); + } else { + day = afterMonth.substring(0, 2); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 2); + } + if (afterDay.length() != 0) { + time = afterDay; + } + month = months.get(month.toUpperCase()); + } + } + if (month.length() == 1) { + month = "0" + month; + } + this.stringDate = year + "-" + month + "-" + day; + this.dateFormatted = LocalDate.parse(year + "-" + month + "-" + day); + if (date.length() > 10 && time.length() != 0) { + if (time.length() <= 3) { + hour = "0" + time.charAt(0); + System.out.println(hour); + minutes = time.substring(1, 3); + } else { + hour = time.substring(0, 2); + minutes = time.substring(2, 4); + } + this.stringTime = hour + ":" + minutes + ":00"; + this.timeFormatted = LocalTime.parse(hour + ":" + minutes + ":" + "00"); + } + if (this.timeFormatted != null) { + this.dateAndTime = LocalDateTime.parse(this.stringDate + "T" + this.stringTime); + } + } + + public String formatDate(String pattern) { + DateTimeFormatter df = new DateTimeFormatterBuilder().parseCaseInsensitive() + .appendPattern(pattern).toFormatter(Locale.ENGLISH); + return this.dateFormatted.format(df); + } + + public String formatTime() { + return this.timeFormatted.format(DateTimeFormatter.ISO_TIME); + } + + @Override + public String toString() { + if (this.timeFormatted == null) { + return this.formatDate("MMM d yyyy"); + } else { + return this.formatDate("MMM d yyyy") + " " + this.formatTime(); + } + } + + public static void main(String args[]) { + DateFormat d4 = new DateFormat("6/7/2021 1800"); + System.out.println(d4.formatDate("MMM d yyyy")); + System.out.println(d4.formatTime()); + } +} diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java index dcbb82a841..13c530a072 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/Deadline.java @@ -1,11 +1,11 @@ public class Deadline extends Task{ protected String description; protected boolean isDone; - protected String date; + protected DateFormat date; public Deadline(String description, String date) { this.description = description; - this.date = date; + this.date = new DateFormat(date); } public void isMark(boolean bool) { @@ -19,6 +19,6 @@ public String getStatusIcon() { @Override public String toString() { return "[D][" + this.getStatusIcon() + "] " + - this.description + " (by: " + this.date + ")"; + this.description + " (by: " + this.date.toString() + ")"; } } diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 9e47d44372..0266d5fbcc 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -7,7 +7,7 @@ public static void main(String[] args) { System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); String currReply = reply.nextLine(); - ArrayList list = new ArrayList(100); + ArrayList list = new ArrayList<>(100); while (!currReply.equals("bye")) { if (currReply.equals("list")) { diff --git a/src/main/java/Event.java b/src/main/java/Event.java index c290871803..a6038117db 100644 --- a/src/main/java/Event.java +++ b/src/main/java/Event.java @@ -1,11 +1,11 @@ public class Event extends Task{ protected String description; protected boolean isDone; - protected String date; + protected DateFormat date; public Event(String description, String date) { this.description = description; - this.date = date; + this.date = new DateFormat(date); } public void isMark(boolean bool) { @@ -19,6 +19,6 @@ public String getStatusIcon() { @Override public String toString() { return "[E][" + this.getStatusIcon() + "] " + - this.description + " (at: " + this.date + ")"; + this.description + " (at: " + this.date.toString() + ")"; } } From 3c84725f5cd5a6c2596c6e3a54e01d0e122d7d02 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sun, 28 Aug 2022 04:20:29 +0800 Subject: [PATCH 12/35] Add more OOP --- data/duke.txt | 3 - data/tasks.txt | 0 src/main/java/AddCommand.java | 77 ++++++++++++ src/main/java/ByeCommand.java | 17 +++ src/main/java/Command.java | 4 + src/main/java/DateFormat.java | 3 +- src/main/java/DeleteCommand.java | 31 +++++ src/main/java/Duke.java | 198 +++++-------------------------- src/main/java/EditCommand.java | 47 ++++++++ src/main/java/FalseCommand.java | 22 ++++ src/main/java/FileData.java | 1 - src/main/java/ListCommand.java | 27 +++++ src/main/java/Parser.java | 24 ++++ src/main/java/Storage.java | 64 ++++++++++ src/main/java/TaskList.java | 43 +++++++ src/main/java/Ui.java | 53 +++++++++ text-ui-test/EXPECTED.TXT | 9 +- text-ui-test/input.txt | 4 +- 18 files changed, 450 insertions(+), 177 deletions(-) delete mode 100644 data/duke.txt create mode 100644 data/tasks.txt create mode 100644 src/main/java/AddCommand.java create mode 100644 src/main/java/ByeCommand.java create mode 100644 src/main/java/Command.java create mode 100644 src/main/java/DeleteCommand.java create mode 100644 src/main/java/EditCommand.java create mode 100644 src/main/java/FalseCommand.java create mode 100644 src/main/java/ListCommand.java create mode 100644 src/main/java/Parser.java create mode 100644 src/main/java/Storage.java create mode 100644 src/main/java/TaskList.java create mode 100644 src/main/java/Ui.java diff --git a/data/duke.txt b/data/duke.txt deleted file mode 100644 index aaa692f72c..0000000000 --- a/data/duke.txt +++ /dev/null @@ -1,3 +0,0 @@ -[T][ ] read book -[D][ ] read book (by: Feb 2 2222 15:00:00) -[E][ ] read book (at: Feb 2 2222) diff --git a/data/tasks.txt b/data/tasks.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/main/java/AddCommand.java b/src/main/java/AddCommand.java new file mode 100644 index 0000000000..ab62ae3420 --- /dev/null +++ b/src/main/java/AddCommand.java @@ -0,0 +1,77 @@ +public class AddCommand extends Command { + protected String commandLine; + + public AddCommand(String str) { + this.commandLine = str; + } + + @Override + public boolean isExit() { + return false; + } + + @Override + public void execute(TaskList taskList, Ui ui, Storage storage) { + if (commandLine.startsWith("todo")) { + try { + if (commandLine.length() <= 4) { + throw new DukeException("The description of a todo cannot be empty."); + } else { + String actTask = commandLine.substring(5); + Task currTask = new Todo(actTask); + taskList.add(currTask); + storage.updateData(taskList); + System.out.println("Got it. I've added this task:\n" + + " " + currTask + "\n" + + "Now you have " + taskList.size() + " tasks in the list.\n"); + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } else if (commandLine.startsWith("deadline")) { + try { + if (commandLine.length() <= 8) { + throw new DukeException("The description of a deadline cannot be empty."); + } else { + if (!commandLine.contains("/")) { + System.out.println("There is no date! >:(\n"); + } else { + int slashIndex = commandLine.indexOf("/"); + String actTask = commandLine.substring(9, slashIndex - 1); + String taskDate = commandLine.substring(slashIndex + 4); + Task currTask = new Deadline(actTask, taskDate); + taskList.add(currTask); + storage.updateData(taskList); + System.out.println("Got it. I've added this task:\n" + + " " + currTask + "\n" + + "Now you have " + taskList.size() + " tasks in the list.\n"); + } + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } else if (commandLine.startsWith("event")) { + try { + if (commandLine.length() <= 5) { + throw new DukeException("The description of a event cannot be empty."); + } else { + if (!commandLine.contains("/")) { + throw new DukeException("There is no date! >:("); + } else { + int slashIndex = commandLine.indexOf("/"); + String actTask = commandLine.substring(6, slashIndex - 1); + String taskDate = commandLine.substring(slashIndex + 4); + Task currTask = new Event(actTask, taskDate); + taskList.add(currTask); + storage.updateData(taskList); + System.out.println("Got it. I've added this task:\n" + + " " + currTask.toString() + "\n" + + "Now you have " + taskList.size() + " tasks in the list.\n"); + } + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } + } +} diff --git a/src/main/java/ByeCommand.java b/src/main/java/ByeCommand.java new file mode 100644 index 0000000000..c41300f1c2 --- /dev/null +++ b/src/main/java/ByeCommand.java @@ -0,0 +1,17 @@ +public class ByeCommand extends Command { + protected String commandLine; + + public ByeCommand(String commandLine) { + this.commandLine = commandLine; + } + + @Override + public boolean isExit() { + return true; + } + + @Override + public void execute(TaskList task, Ui ui, Storage storage) { + ui.showGoodbye(); + } +} diff --git a/src/main/java/Command.java b/src/main/java/Command.java new file mode 100644 index 0000000000..aceda19ca3 --- /dev/null +++ b/src/main/java/Command.java @@ -0,0 +1,4 @@ +public abstract class Command { + public abstract boolean isExit(); + public abstract void execute(TaskList task, Ui ui, Storage storage); +} diff --git a/src/main/java/DateFormat.java b/src/main/java/DateFormat.java index bdd73d4046..f44b6ca32d 100644 --- a/src/main/java/DateFormat.java +++ b/src/main/java/DateFormat.java @@ -15,7 +15,8 @@ public class DateFormat { protected String stringDate; protected String stringTime; protected LocalDateTime dateAndTime; - protected HashMap months = new HashMap(); + protected HashMap months = new HashMap<>(); + public DateFormat(String date) { this.afterBy = date; this.date = date; diff --git a/src/main/java/DeleteCommand.java b/src/main/java/DeleteCommand.java new file mode 100644 index 0000000000..9ef49ce9ce --- /dev/null +++ b/src/main/java/DeleteCommand.java @@ -0,0 +1,31 @@ +public class DeleteCommand extends Command { + protected String commandLine; + + public DeleteCommand(String commandLine) { + this.commandLine = commandLine; + } + + @Override + public boolean isExit() { + return false; + } + + @Override + public void execute(TaskList taskList, Ui ui, Storage storage) { + int index = Integer.parseInt(commandLine.substring(7)) - 1; + try { + if (index > taskList.size() - 1) { + throw new DukeException("You have no such tasks."); + } else { + Task task = taskList.get(index); + taskList.remove(index); + storage.updateData(taskList); + System.out.println("Noted. I've removed this task:\n" + + " " + task.toString() + "\n" + "Now you have " + + taskList.size() + " tasks in the list.\n"); + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } +} diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java index 5bb465107a..182c6d719e 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/Duke.java @@ -2,178 +2,44 @@ import java.util.Scanner; public class Duke { - public static void main(String[] args) { - Scanner reply = new Scanner(System.in); - System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); - FileData f = new FileData("data/duke.txt"); - f.toPrint(); + private Storage storage; + private TaskList tasks; + private Ui ui; - String currReply = reply.nextLine(); - ArrayList list = f.allTasks(); + public Duke(String filePath) { + System.out.println("Hello! I'm Duke\nWhat can I do for you?"); + storage = new Storage(filePath); + try { + tasks = new TaskList(storage.load()); + ui = new Ui(); + } catch (DukeException e) { + ui.showLoadingError(); + tasks = new TaskList(); + } + } - while (!currReply.equals("bye")) { - if (currReply.equals("list")) { - try { - if (list.size() == 0) { - throw new DukeException("There are no tasks in your list. :)"); - } else { - System.out.println("Here are the tasks in your list:"); - list.forEach(n -> System.out.println((list.indexOf(n) + 1) + "." - + n.toString())); - System.out.println(); - currReply = reply.nextLine(); - continue; - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else if (currReply.startsWith("mark")) { - int index = Integer.parseInt(currReply.substring(5)) - 1; - try { - if (index > list.size() - 1) { - throw new DukeException("You have no such tasks."); - } else { - Task task = list.get(index); - task.isMark(true); - f.updateData(list); - System.out.println("Nice! I've marked this task as done:\n" + - " " + task.toString() + "\n"); - currReply = reply.nextLine(); - continue; - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else if (currReply.startsWith("unmark")) { - int index = Integer.parseInt(currReply.substring(7)) - 1; - try { - if (index > list.size() - 1) { - throw new DukeException("You have no such tasks."); - } else { - Task task = list.get(index); - task.isMark(false); - f.updateData(list); - System.out.println("OK, I've marked this task as not done yet:\n" + - " " + task.toString() + "\n"); - currReply = reply.nextLine(); - continue; - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; + public void run() { + boolean isExit = false; + while (!isExit) { + try { + String fullCommand = ui.readCommand(); + ui.showLine(); // show the divider line ("_______") + Parser parser = new Parser(fullCommand); + Command c = parser.parse(fullCommand); + c.execute(tasks, ui, storage); + isExit = c.isExit(); + if (!isExit) { + ui.changeCommand(); } - } else if (currReply.startsWith("delete")) { - int index = Integer.parseInt(currReply.substring(7)) - 1; - try { - if (index > list.size() - 1) { - throw new DukeException("You have no such tasks."); - } else { - Task task = list.get(index); - list.remove(index); - f.updateData(list); - System.out.println("Noted. I've removed this task:\n" + - " " + task.toString() + "\n" + "Now you have " + - list.size() + " tasks in the list.\n"); - currReply = reply.nextLine(); - continue; - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else { - if (currReply.startsWith("todo")) { - try { - if (currReply.length() <= 4) { - throw new DukeException("The description of a todo cannot be empty."); - } else { - String actTask = currReply.substring(5); - Task currTask = new Todo(actTask); - list.add(currTask); - f.updateData(list); - System.out.println("Got it. I've added this task:\n" + - " " + currTask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); - currReply = reply.nextLine(); - continue; - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else if (currReply.startsWith("deadline")) { - try { - if (currReply.length() <= 8) { - throw new DukeException("The description of a deadline cannot be empty."); - } else { - if (!currReply.contains("/")) { - System.out.println("There is no date! >:(\n"); - } else { - int slashIndex = currReply.indexOf("/"); - String actTask = currReply.substring(9, slashIndex - 1); - String taskDate = currReply.substring(slashIndex + 4); - Task currTask = new Deadline(actTask, taskDate); - list.add(currTask); - f.updateData(list); - System.out.println("Got it. I've added this task:\n" + - " " + currTask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); - currReply = reply.nextLine(); - continue; - } - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else if (currReply.startsWith("event")) { - try { - if (currReply.length() <= 5) { - throw new DukeException("The description of a event cannot be empty."); - } else { - if (!currReply.contains("/")) { - throw new DukeException("There is no date! >:("); - } else { - int slashIndex = currReply.indexOf("/"); - String actTask = currReply.substring(6, slashIndex - 1); - String taskDate = currReply.substring(slashIndex + 4); - Task currTask = new Event(actTask, taskDate); - list.add(currTask); - f.updateData(list); - System.out.println("Got it. I've added this task:\n" + - " " + currTask.toString() + "\n" + - "Now you have " + list.size() + " tasks in the list.\n"); - currReply = reply.nextLine(); - continue; - } - } - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } else { - try { - throw new DukeException("I'm sorry, but I don't know what that means :-("); - } catch (DukeException e) { - System.out.println(e.toString()); - currReply = reply.nextLine(); - continue; - } - } - currReply = reply.nextLine(); + } catch (DukeException e) { + ui.showError(e.getMessage()); } } - System.out.println("Bye. Hope to see you again soon!"); } + public static void main(String[] args) { + new Duke("data/tasks.txt").run(); + } } + diff --git a/src/main/java/EditCommand.java b/src/main/java/EditCommand.java new file mode 100644 index 0000000000..531ce58d64 --- /dev/null +++ b/src/main/java/EditCommand.java @@ -0,0 +1,47 @@ +public class EditCommand extends Command { + protected String commandLine; + + public EditCommand(String commandLine) { + this.commandLine = commandLine; + } + + @Override + public boolean isExit() { + return false; + } + + @Override + public void execute(TaskList taskList, Ui ui, Storage storage) { + if (commandLine.startsWith("mark")) { + int index = Integer.parseInt(commandLine.substring(5)) - 1; + try { + if (index > taskList.size() - 1) { + throw new DukeException("You have no such tasks."); + } else { + Task task = taskList.get(index); + task.isMark(true); + storage.updateData(taskList); + System.out.println("Nice! I've marked this task as done:\n" + + " " + task + "\n"); + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } else { + int index = Integer.parseInt(commandLine.substring(7)) - 1; + try { + if (index > taskList.size() - 1) { + throw new DukeException("You have no such tasks."); + } else { + Task task = taskList.get(index); + task.isMark(false); + storage.updateData(taskList); + System.out.println("OK, I've marked this task as not done yet:\n" + + " " + task + "\n"); + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } + } +} diff --git a/src/main/java/FalseCommand.java b/src/main/java/FalseCommand.java new file mode 100644 index 0000000000..f56a8d9acd --- /dev/null +++ b/src/main/java/FalseCommand.java @@ -0,0 +1,22 @@ +public class FalseCommand extends Command { + protected String commandLine; + + public FalseCommand(String commandLine) { + this.commandLine = commandLine; + } + + @Override + public boolean isExit() { + return false; + } + + @Override + public void execute(TaskList task, Ui ui, Storage storage) throws DukeException { + try { + throw new DukeException("I'm sorry, but I don't know what that means :-(\n"); + } catch (DukeException e) { + System.out.println(e.toString()); + ui.nextCommand(); + } + } +} diff --git a/src/main/java/FileData.java b/src/main/java/FileData.java index c2b2f77cfa..45eb80456a 100644 --- a/src/main/java/FileData.java +++ b/src/main/java/FileData.java @@ -34,7 +34,6 @@ private static void appendToFile(String filePath, String textToAppend) throws IO } public void updateData(ArrayList tasks) { - int count = 0; for (int i = 0; i < tasks.size(); i++) { try { if (i == 0) { diff --git a/src/main/java/ListCommand.java b/src/main/java/ListCommand.java new file mode 100644 index 0000000000..ea89b0467f --- /dev/null +++ b/src/main/java/ListCommand.java @@ -0,0 +1,27 @@ +public class ListCommand extends Command { + protected String commandLine; + + public ListCommand(String commandLine) { + this.commandLine = commandLine; + } + + @Override + public boolean isExit() { + return false; + } + + @Override + public void execute(TaskList taskList, Ui ui, Storage storage) { + try { + if (taskList.size() == 0) { + throw new DukeException("There are no tasks in your list. :)"); + } else { + System.out.println("Here are the tasks in your list:"); + taskList.forEach(); + System.out.println(); + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } +} diff --git a/src/main/java/Parser.java b/src/main/java/Parser.java new file mode 100644 index 0000000000..483198d6d8 --- /dev/null +++ b/src/main/java/Parser.java @@ -0,0 +1,24 @@ +public class Parser { + protected String fullCommand; + + public Parser(String fullCommand) { + this.fullCommand = fullCommand; + } + + public Command parse(String fullCommand) { + if (fullCommand.isEmpty() || fullCommand.equals("bye")) { + return new ByeCommand(fullCommand); + } else if (fullCommand.equals("list")) { + return new ListCommand(fullCommand); + } else if (fullCommand.startsWith("delete")) { + return new DeleteCommand(fullCommand); + } else if (fullCommand.startsWith("mark") || fullCommand.startsWith("unmark")) { + return new EditCommand(fullCommand); + } else if (fullCommand.startsWith("todo") || fullCommand.startsWith("deadline") || + fullCommand.startsWith("event")) { + return new AddCommand(fullCommand); + } else { + return new FalseCommand(fullCommand); + } + } +} diff --git a/src/main/java/Storage.java b/src/main/java/Storage.java new file mode 100644 index 0000000000..4d3673ec44 --- /dev/null +++ b/src/main/java/Storage.java @@ -0,0 +1,64 @@ +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; + +public class Storage { + protected String filePath; + protected FileData f; + protected TaskList tasks; + + public Storage(String filePath) { + this.filePath = filePath; + this.f = new FileData(filePath); + this.tasks = new TaskList(this.f.storeArray()); + } + + public ArrayList load() throws DukeException { + this.f.toPrint(); + return tasks.toArray(); + } + + private static void writeToFile(String filePath, String textToAdd) throws IOException { + FileWriter fw = new FileWriter(filePath); + fw.write(textToAdd); + fw.close(); + } + + private static void appendToFile(String filePath, String textToAppend) throws IOException { + FileWriter fw = new FileWriter(filePath, true); // create a FileWriter in append mode + fw.write(textToAppend); + fw.close(); + } + + public void storeData(String textToStore) { + String file = this.filePath; + try { + appendToFile(file, textToStore + System.lineSeparator()); + } catch (IOException e) { + System.out.println("Something went wrong: " + e.getMessage()); + } + } + + public void updateData(TaskList taskList) { + f.updateData(taskList.toArray()); + } + + public void save() throws DukeException { + if (!this.f.exists()) { + throw new DukeException("The file does not exist!"); + } else { + for (int i = 0; i < tasks.size(); i++) { + try { + if (i == 0) { + writeToFile(this.filePath, tasks.get(i).toString() + System.lineSeparator()); + } else { + storeData(tasks.get(i).toString()); + } + } catch (IOException e) { + System.out.println("Something went wrong: " + e.getMessage()); + } + } + } + } + +} diff --git a/src/main/java/TaskList.java b/src/main/java/TaskList.java new file mode 100644 index 0000000000..d345da311a --- /dev/null +++ b/src/main/java/TaskList.java @@ -0,0 +1,43 @@ +import java.util.ArrayList; + +public class TaskList { + protected Task task; + protected ArrayList taskList; + + public TaskList(ArrayList tasks) throws DukeException { + this.taskList = tasks; + } + + public TaskList() { + this.taskList = new ArrayList<>(100); + } + + public Task get(int index) { + return this.taskList.get(index); + } + + public void update() { + + } + + public void add(Task task) { + taskList.add(task); + } + + public void forEach() { + taskList.forEach(n -> System.out.println((taskList.indexOf(n) + 1) + "." + + n.toString())); + } + + public void remove(int index) { + taskList.remove(index); + } + + public ArrayList toArray() { + return this.taskList; + } + + public int size() { + return this.taskList.size(); + } +} diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java new file mode 100644 index 0000000000..95d47f2f4a --- /dev/null +++ b/src/main/java/Ui.java @@ -0,0 +1,53 @@ +import java.util.Scanner; + +public class Ui { + protected Scanner in; + protected String nextCommand; + + public Ui() { + this.in = new Scanner(System.in); + this.nextCommand = in.nextLine(); + } + + public Ui(Scanner in) { + this.in = in; + this.nextCommand = in.nextLine(); + } + + public void showWelcome() { + System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + } + + public void showGoodbye() { + System.out.println("Bye. Hope to see you again soon!"); + } + + public String readCommand() { + return this.nextCommand; + } + + public void changeCommand() { + this.nextCommand = this.in.nextLine(); + } + + public void nextCommand() { + this.in.nextLine(); + } + + public void showLoadingError() throws DukeException { + try { + throw new DukeException("The file is empty!"); + } catch (DukeException e) { + System.out.println(e.toString()); + } + } + + public void showError(String error) { + System.out.println(error); + } + + public void showLine() { + System.out.println("---------------------------------"); + } + +} diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 829d932cd0..1121ceaa6e 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -5,18 +5,19 @@ Got it. I've added this task: [T][ ] borrow book Now you have 1 tasks in the list. +--------------------------------- Got it. I've added this task: - [D][ ] return book (by: Sunday) + [D][ ] return book (by: Feb 02 2022 18:00:00) Now you have 2 tasks in the list. Got it. I've added this task: - [E][ ] project meeting (at: Mon 2-4pm) + [E][ ] project meeting (at: Feb 01 2022 14:00:00) Now you have 3 tasks in the list. Here are the tasks in your list: 1.[T][ ] borrow book -2.[D][ ] return book (by: Sunday) -3.[E][ ] project meeting (at: Mon 2-4pm) +2.[D][ ] return book (by: Feb 02 2022 18:00:00) +3.[E][ ] project meeting (at: Feb 01 2022 14:00:00) Nice! I've marked this task as done: [T][X] borrow book diff --git a/text-ui-test/input.txt b/text-ui-test/input.txt index a11480c663..559cb5f2e2 100644 --- a/text-ui-test/input.txt +++ b/text-ui-test/input.txt @@ -1,6 +1,6 @@ todo borrow book -deadline return book /by Sunday -event project meeting /at Mon 2-4pm +deadline return book /by 2-2-2022 1800 +event project meeting /at 1/2/2022 1400 list mark 1 unmark 1 From 199fd4dc0ca29210738b7555d7dcfe7cf2894df7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sun, 28 Aug 2022 18:56:30 +0800 Subject: [PATCH 13/35] Organize the classes into suitable java packages --- README.md | 4 ++-- data/tasks.txt | 1 + src/main/java/{ => command}/AddCommand.java | 11 +++++++++++ src/main/java/{ => command}/ByeCommand.java | 6 ++++++ src/main/java/{ => command}/Command.java | 6 ++++++ src/main/java/{ => command}/DeleteCommand.java | 8 ++++++++ src/main/java/{ => command}/EditCommand.java | 8 ++++++++ src/main/java/{ => command}/FalseCommand.java | 7 +++++++ src/main/java/{ => command}/ListCommand.java | 7 +++++++ src/main/java/{ => dateformat}/DateFormat.java | 2 ++ src/main/java/{ => duke}/Duke.java | 12 +++++++++--- src/main/java/{ => exception}/DukeException.java | 2 ++ src/main/java/{ => filedata}/FileData.java | 7 +++++++ src/main/java/{ => parser}/Parser.java | 10 ++++++++++ src/main/java/{ => storage}/Storage.java | 7 +++++++ src/main/java/{ => task}/Deadline.java | 6 +++++- src/main/java/{ => task}/Event.java | 6 +++++- src/main/java/{ => task}/Task.java | 2 ++ src/main/java/{ => task}/TaskList.java | 4 ++++ src/main/java/{ => task}/Todo.java | 3 +++ src/main/java/{ => ui}/Ui.java | 6 +++++- text-ui-test/EXPECTED.TXT | 2 +- 22 files changed, 118 insertions(+), 9 deletions(-) rename src/main/java/{ => command}/AddCommand.java (94%) rename src/main/java/{ => command}/ByeCommand.java (81%) rename src/main/java/{ => command}/Command.java (64%) rename src/main/java/{ => command}/DeleteCommand.java (88%) rename src/main/java/{ => command}/EditCommand.java (92%) rename src/main/java/{ => command}/FalseCommand.java (83%) rename src/main/java/{ => command}/ListCommand.java (86%) rename src/main/java/{ => dateformat}/DateFormat.java (99%) rename src/main/java/{ => duke}/Duke.java (82%) rename src/main/java/{ => exception}/DukeException.java (93%) rename src/main/java/{ => filedata}/FileData.java (97%) rename src/main/java/{ => parser}/Parser.java (81%) rename src/main/java/{ => storage}/Storage.java (94%) rename src/main/java/{ => task}/Deadline.java (87%) rename src/main/java/{ => task}/Event.java (88%) rename src/main/java/{ => task}/Task.java (97%) rename src/main/java/{ => task}/TaskList.java (94%) rename src/main/java/{ => task}/Todo.java (96%) rename src/main/java/{ => ui}/Ui.java (89%) diff --git a/README.md b/README.md index 8715d4d915..a8111be768 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Duke project template +# duke.duke project template This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. @@ -13,7 +13,7 @@ Prerequisites: JDK 11, update Intellij to the most recent version. 1. If there are any further prompts, accept the defaults. 1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).
In the same dialog, set the **Project language level** field to the `SDK default` option. -3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output: +3. After that, locate the `src/main/java/duke.duke.java` file, right-click it, and choose `Run duke.duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output: ``` Hello from ____ _ diff --git a/data/tasks.txt b/data/tasks.txt index e69de29bb2..48a6d06889 100644 --- a/data/tasks.txt +++ b/data/tasks.txt @@ -0,0 +1 @@ +[T][ ] read book diff --git a/src/main/java/AddCommand.java b/src/main/java/command/AddCommand.java similarity index 94% rename from src/main/java/AddCommand.java rename to src/main/java/command/AddCommand.java index ab62ae3420..178f1cdf17 100644 --- a/src/main/java/AddCommand.java +++ b/src/main/java/command/AddCommand.java @@ -1,3 +1,14 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; +import task.Task; +import task.Todo; +import task.Deadline; +import task.Event; + public class AddCommand extends Command { protected String commandLine; diff --git a/src/main/java/ByeCommand.java b/src/main/java/command/ByeCommand.java similarity index 81% rename from src/main/java/ByeCommand.java rename to src/main/java/command/ByeCommand.java index c41300f1c2..92fabd5a6c 100644 --- a/src/main/java/ByeCommand.java +++ b/src/main/java/command/ByeCommand.java @@ -1,3 +1,9 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; + public class ByeCommand extends Command { protected String commandLine; diff --git a/src/main/java/Command.java b/src/main/java/command/Command.java similarity index 64% rename from src/main/java/Command.java rename to src/main/java/command/Command.java index aceda19ca3..97312ee12c 100644 --- a/src/main/java/Command.java +++ b/src/main/java/command/Command.java @@ -1,3 +1,9 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; + public abstract class Command { public abstract boolean isExit(); public abstract void execute(TaskList task, Ui ui, Storage storage); diff --git a/src/main/java/DeleteCommand.java b/src/main/java/command/DeleteCommand.java similarity index 88% rename from src/main/java/DeleteCommand.java rename to src/main/java/command/DeleteCommand.java index 9ef49ce9ce..599ee56046 100644 --- a/src/main/java/DeleteCommand.java +++ b/src/main/java/command/DeleteCommand.java @@ -1,3 +1,11 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; +import task.Task; + public class DeleteCommand extends Command { protected String commandLine; diff --git a/src/main/java/EditCommand.java b/src/main/java/command/EditCommand.java similarity index 92% rename from src/main/java/EditCommand.java rename to src/main/java/command/EditCommand.java index 531ce58d64..4a32c3001b 100644 --- a/src/main/java/EditCommand.java +++ b/src/main/java/command/EditCommand.java @@ -1,3 +1,11 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; +import task.Task; + public class EditCommand extends Command { protected String commandLine; diff --git a/src/main/java/FalseCommand.java b/src/main/java/command/FalseCommand.java similarity index 83% rename from src/main/java/FalseCommand.java rename to src/main/java/command/FalseCommand.java index f56a8d9acd..cc604b6ec4 100644 --- a/src/main/java/FalseCommand.java +++ b/src/main/java/command/FalseCommand.java @@ -1,3 +1,10 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; + public class FalseCommand extends Command { protected String commandLine; diff --git a/src/main/java/ListCommand.java b/src/main/java/command/ListCommand.java similarity index 86% rename from src/main/java/ListCommand.java rename to src/main/java/command/ListCommand.java index ea89b0467f..f4be35e5ca 100644 --- a/src/main/java/ListCommand.java +++ b/src/main/java/command/ListCommand.java @@ -1,3 +1,10 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; + public class ListCommand extends Command { protected String commandLine; diff --git a/src/main/java/DateFormat.java b/src/main/java/dateformat/DateFormat.java similarity index 99% rename from src/main/java/DateFormat.java rename to src/main/java/dateformat/DateFormat.java index f44b6ca32d..77cf4d0a40 100644 --- a/src/main/java/DateFormat.java +++ b/src/main/java/dateformat/DateFormat.java @@ -1,3 +1,5 @@ +package dateformat; + import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; diff --git a/src/main/java/Duke.java b/src/main/java/duke/Duke.java similarity index 82% rename from src/main/java/Duke.java rename to src/main/java/duke/Duke.java index 182c6d719e..7a37de9df1 100644 --- a/src/main/java/Duke.java +++ b/src/main/java/duke/Duke.java @@ -1,5 +1,11 @@ -import java.util.ArrayList; -import java.util.Scanner; +package duke; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; +import parser.Parser; +import command.Command; public class Duke { @@ -8,7 +14,7 @@ public class Duke { private Ui ui; public Duke(String filePath) { - System.out.println("Hello! I'm Duke\nWhat can I do for you?"); + System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?"); storage = new Storage(filePath); try { tasks = new TaskList(storage.load()); diff --git a/src/main/java/DukeException.java b/src/main/java/exception/DukeException.java similarity index 93% rename from src/main/java/DukeException.java rename to src/main/java/exception/DukeException.java index 1bb2316089..e147a5bb35 100644 --- a/src/main/java/DukeException.java +++ b/src/main/java/exception/DukeException.java @@ -1,3 +1,5 @@ +package exception; + public class DukeException extends IllegalArgumentException{ protected String message; diff --git a/src/main/java/FileData.java b/src/main/java/filedata/FileData.java similarity index 97% rename from src/main/java/FileData.java rename to src/main/java/filedata/FileData.java index 45eb80456a..53ad2754d8 100644 --- a/src/main/java/FileData.java +++ b/src/main/java/filedata/FileData.java @@ -1,3 +1,5 @@ +package filedata; + import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; @@ -5,6 +7,11 @@ import java.util.ArrayList; import java.util.Scanner; +import task.Task; +import task.Todo; +import task.Deadline; +import task.Event; + public class FileData { protected String fileName; protected File file; diff --git a/src/main/java/Parser.java b/src/main/java/parser/Parser.java similarity index 81% rename from src/main/java/Parser.java rename to src/main/java/parser/Parser.java index 483198d6d8..fcc731d158 100644 --- a/src/main/java/Parser.java +++ b/src/main/java/parser/Parser.java @@ -1,3 +1,13 @@ +package parser; + +import command.AddCommand; +import command.ByeCommand; +import command.Command; +import command.DeleteCommand; +import command.EditCommand; +import command.FalseCommand; +import command.ListCommand; + public class Parser { protected String fullCommand; diff --git a/src/main/java/Storage.java b/src/main/java/storage/Storage.java similarity index 94% rename from src/main/java/Storage.java rename to src/main/java/storage/Storage.java index 4d3673ec44..4884bddbf9 100644 --- a/src/main/java/Storage.java +++ b/src/main/java/storage/Storage.java @@ -1,7 +1,14 @@ +package storage; + import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; +import exception.DukeException; +import filedata.FileData; +import task.Task; +import task.TaskList; + public class Storage { protected String filePath; protected FileData f; diff --git a/src/main/java/Deadline.java b/src/main/java/task/Deadline.java similarity index 87% rename from src/main/java/Deadline.java rename to src/main/java/task/Deadline.java index 13c530a072..078d951d9a 100644 --- a/src/main/java/Deadline.java +++ b/src/main/java/task/Deadline.java @@ -1,4 +1,8 @@ -public class Deadline extends Task{ +package task; + +import dateformat.DateFormat; + +public class Deadline extends Task { protected String description; protected boolean isDone; protected DateFormat date; diff --git a/src/main/java/Event.java b/src/main/java/task/Event.java similarity index 88% rename from src/main/java/Event.java rename to src/main/java/task/Event.java index a6038117db..48cab7558d 100644 --- a/src/main/java/Event.java +++ b/src/main/java/task/Event.java @@ -1,4 +1,8 @@ -public class Event extends Task{ +package task; + +import dateformat.DateFormat; + +public class Event extends Task { protected String description; protected boolean isDone; protected DateFormat date; diff --git a/src/main/java/Task.java b/src/main/java/task/Task.java similarity index 97% rename from src/main/java/Task.java rename to src/main/java/task/Task.java index 07984cfe63..a68b6c8047 100644 --- a/src/main/java/Task.java +++ b/src/main/java/task/Task.java @@ -1,3 +1,5 @@ +package task; + public class Task { protected String description; protected boolean isDone; diff --git a/src/main/java/TaskList.java b/src/main/java/task/TaskList.java similarity index 94% rename from src/main/java/TaskList.java rename to src/main/java/task/TaskList.java index d345da311a..8af2bdbc28 100644 --- a/src/main/java/TaskList.java +++ b/src/main/java/task/TaskList.java @@ -1,3 +1,7 @@ +package task; + +import exception.DukeException; + import java.util.ArrayList; public class TaskList { diff --git a/src/main/java/Todo.java b/src/main/java/task/Todo.java similarity index 96% rename from src/main/java/Todo.java rename to src/main/java/task/Todo.java index 95d4590495..b78273e256 100644 --- a/src/main/java/Todo.java +++ b/src/main/java/task/Todo.java @@ -1,3 +1,6 @@ +package task; + + public class Todo extends Task { protected String description; protected boolean isDone; diff --git a/src/main/java/Ui.java b/src/main/java/ui/Ui.java similarity index 89% rename from src/main/java/Ui.java rename to src/main/java/ui/Ui.java index 95d47f2f4a..ecba907218 100644 --- a/src/main/java/Ui.java +++ b/src/main/java/ui/Ui.java @@ -1,3 +1,7 @@ +package ui; + +import exception.DukeException; + import java.util.Scanner; public class Ui { @@ -15,7 +19,7 @@ public Ui(Scanner in) { } public void showWelcome() { - System.out.println("Hello! I'm Duke\nWhat can I do for you?\n"); + System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?\n"); } public void showGoodbye() { diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 1121ceaa6e..15ebefbb24 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -1,4 +1,4 @@ -Hello! I'm Duke +Hello! I'm duke.duke What can I do for you? Got it. I've added this task: From 61d8501032a489905768d85ace28126509e8bc0c Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Mon, 29 Aug 2022 04:11:01 +0800 Subject: [PATCH 14/35] Add JUnit tests to test the behavior of some code --- data/test.txt | 0 src/main/java/command/AddCommand.java | 2 +- src/main/java/dateformat/DateFormat.java | 36 ++++++++++++------------ src/test/java/DeadlineTest.java | 29 +++++++++++++++++++ src/test/java/EventTest.java | 30 ++++++++++++++++++++ src/test/java/TodoTest.java | 30 ++++++++++++++++++++ 6 files changed, 108 insertions(+), 19 deletions(-) create mode 100644 data/test.txt create mode 100644 src/test/java/DeadlineTest.java create mode 100644 src/test/java/EventTest.java create mode 100644 src/test/java/TodoTest.java diff --git a/data/test.txt b/data/test.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/main/java/command/AddCommand.java b/src/main/java/command/AddCommand.java index 178f1cdf17..a02027cfd5 100644 --- a/src/main/java/command/AddCommand.java +++ b/src/main/java/command/AddCommand.java @@ -22,7 +22,7 @@ public boolean isExit() { } @Override - public void execute(TaskList taskList, Ui ui, Storage storage) { + public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { if (commandLine.startsWith("todo")) { try { if (commandLine.length() <= 4) { diff --git a/src/main/java/dateformat/DateFormat.java b/src/main/java/dateformat/DateFormat.java index 77cf4d0a40..3946136880 100644 --- a/src/main/java/dateformat/DateFormat.java +++ b/src/main/java/dateformat/DateFormat.java @@ -47,7 +47,7 @@ public DateFormat(String date) { if (this.afterBy.contains("/")) { - if (this.afterBy.indexOf("/") < 2) { + if (this.afterBy.indexOf("/") <= 2) { int afterDaySlashIndex = afterBy.indexOf("/"); String afterDay; if (afterDaySlashIndex == 1) { @@ -55,16 +55,16 @@ public DateFormat(String date) { afterDay = afterBy.substring(afterDaySlashIndex + 1); } else { day = afterBy.substring(0, 2); - afterDay = afterBy.substring(afterDaySlashIndex + 2); + afterDay = afterBy.substring(afterDaySlashIndex + 1); } int afterMonthSlashIndex = afterDay.indexOf("/"); String afterMonth; if (afterMonthSlashIndex == 1) { month = "0" + afterDay.charAt(0); - afterMonth = afterDay.substring(afterMonthSlashIndex + 1); + afterMonth = afterDay.substring(afterDaySlashIndex + 1); } else { month = afterDay.substring(0, 2); - afterMonth = afterDay.substring(afterMonthSlashIndex + 2); + afterMonth = afterDay.substring(afterMonthSlashIndex + 1); } year = afterMonth.substring(0, 4); if (afterMonth.length() > 5) { @@ -85,7 +85,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } year = afterDay.substring(0, 4); if (afterDay.length() > 5) { @@ -106,7 +106,7 @@ public DateFormat(String date) { afterMonth = afterYear.substring(afterMonthSlashIndex + 1); } else { month = afterYear.substring(0, 2); - afterMonth = afterYear.substring(afterMonthSlashIndex + 2); + afterMonth = afterYear.substring(afterMonthSlashIndex + 1); } String afterDay; if (afterMonth.charAt(1) == ' ') { @@ -114,7 +114,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } if (afterDay.length() > 5) { if (afterDay.charAt(7) == ':') { @@ -133,7 +133,7 @@ public DateFormat(String date) { afterDay = afterBy.substring(afterDayDashIndex + 1); } else { day = afterBy.substring(0, 2); - afterDay = afterBy.substring(afterDayDashIndex + 2); + afterDay = afterBy.substring(afterDayDashIndex + 1); } int afterMonthDashIndex = afterDay.indexOf("-"); String afterMonth; @@ -142,7 +142,7 @@ public DateFormat(String date) { afterMonth = afterDay.substring(afterMonthDashIndex + 1); } else { month = afterDay.substring(0, 2); - afterMonth = afterDay.substring(afterMonthDashIndex + 2); + afterMonth = afterDay.substring(afterMonthDashIndex + 1); } year = afterMonth.substring(0, 4); if (afterMonth.length() > 5) { @@ -163,7 +163,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterMonthSlashIndex + 2); + afterDay = afterMonth.substring(afterMonthSlashIndex + 1); } year = afterDay.substring(0, 4); if (afterDay.length() > 5) { @@ -184,7 +184,7 @@ public DateFormat(String date) { afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); } else { month = afterYear.substring(0, 2); - afterMonth = afterYear.substring(afterMonthSpaceIndex + 2); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); } String afterDay; if (afterMonth.charAt(1) == ' ') { @@ -192,7 +192,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterMonthSpaceIndex + 2); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); } if (afterDay.length() > 2) { if (afterDay.charAt(7) == ':') { @@ -212,7 +212,7 @@ public DateFormat(String date) { afterDay = afterBy.substring(afterDaySpaceIndex + 1); } else { day = afterBy.substring(0, 2); - afterDay = afterBy.substring(afterDaySpaceIndex + 2); + afterDay = afterBy.substring(afterDaySpaceIndex + 1); } int afterMonthSpaceIndex = afterDay.indexOf(" "); String afterMonth; @@ -221,7 +221,7 @@ public DateFormat(String date) { afterMonth = afterDay.substring(afterMonthSpaceIndex + 1); } else { month = afterDay.substring(0, 2); - afterMonth = afterDay.substring(afterMonthSpaceIndex + 2); + afterMonth = afterDay.substring(afterMonthSpaceIndex + 1); } year = afterMonth.substring(0, 4); if (afterMonth.length() > 5) { @@ -243,7 +243,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterDaySpaceIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterDaySpaceIndex + 2); + afterDay = afterMonth.substring(afterDaySpaceIndex + 1); } year = afterDay.substring(0, 4); if (afterDay.length() > 5) { @@ -265,7 +265,7 @@ public DateFormat(String date) { afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); } else { month = afterYear.substring(0, 2); - afterMonth = afterYear.substring(afterMonthSpaceIndex + 2); + afterMonth = afterYear.substring(afterMonthSpaceIndex + 1); } String afterDay; if (afterMonth.charAt(1) == ' ') { @@ -273,7 +273,7 @@ public DateFormat(String date) { afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); } else { day = afterMonth.substring(0, 2); - afterDay = afterMonth.substring(afterMonthSpaceIndex + 2); + afterDay = afterMonth.substring(afterMonthSpaceIndex + 1); } if (afterDay.length() > 2) { if (afterDay.charAt(7) == ':') { @@ -327,7 +327,7 @@ public String toString() { } public static void main(String args[]) { - DateFormat d4 = new DateFormat("6/7/2021 1800"); + DateFormat d4 = new DateFormat("16/10/2021 1800"); System.out.println(d4.formatDate("MMM d yyyy")); System.out.println(d4.formatTime()); } diff --git a/src/test/java/DeadlineTest.java b/src/test/java/DeadlineTest.java new file mode 100644 index 0000000000..2e83f75964 --- /dev/null +++ b/src/test/java/DeadlineTest.java @@ -0,0 +1,29 @@ +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import task.Task; +import task.Deadline; + +public class DeadlineTest { + + @Test + public void getStatusIcon_unmarked() { + Task deadline = new Deadline("return book", "21/10/2022 1800"); + deadline.isMark(false); + assertEquals(" ", deadline.getStatusIcon()); + } + + @Test + public void getStatusIcon_marked() { + Task deadline = new Deadline("return book", "21/10/2022 1800"); + deadline.isMark(true); + assertEquals("X", deadline.getStatusIcon()); + } + + @Test + public void toString_success() { + Task deadline = new Deadline("return book", "21/10/2022 1800"); + assertEquals("[D][ ] return book (by: Oct 21 2022 18:00:00)", deadline.toString()); + } +} diff --git a/src/test/java/EventTest.java b/src/test/java/EventTest.java new file mode 100644 index 0000000000..9c6012de8f --- /dev/null +++ b/src/test/java/EventTest.java @@ -0,0 +1,30 @@ +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import task.Task; +import task.Event; +import task.Deadline; + +public class EventTest { + + @Test + public void getStatusIcon_unmarked() { + Task event = new Event("read book", "20/10/2022 1800"); + event.isMark(false); + assertEquals(" ", event.getStatusIcon()); + } + + @Test + public void getStatusIcon_marked() { + Task event = new Event("read book", "20/10/2022 1800"); + event.isMark(true); + assertEquals("X", event.getStatusIcon()); + } + + @Test + public void toString_success() { + Task event = new Event("read book", "20/10/2022 1800"); + assertEquals("[E][ ] read book (at: Oct 20 2022 18:00:00)", event.toString()); + } +} diff --git a/src/test/java/TodoTest.java b/src/test/java/TodoTest.java new file mode 100644 index 0000000000..a3a254d00b --- /dev/null +++ b/src/test/java/TodoTest.java @@ -0,0 +1,30 @@ +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import task.Task; +import task.Todo; + + +public class TodoTest { + + @Test + public void getStatusIcon_unmarked() { + Task todo = new Todo("read book"); + todo.isMark(false); + assertEquals(" ", todo.getStatusIcon()); + } + + @Test + public void getStatusIcon_marked() { + Task todo = new Todo("read book"); + todo.isMark(true); + assertEquals("X", todo.getStatusIcon()); + } + + @Test + public void toString_success() { + Task todo = new Todo("read book"); + assertEquals("[T][ ] read book", todo.toString()); + } +} From dd69271dbb7bbd7d6cf876915585a6961b403344 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Mon, 29 Aug 2022 20:15:45 +0800 Subject: [PATCH 15/35] Package the App as a Jar file --- src/main/java/META-INF/MANIFEST.MF | 3 +++ src/main/java/duke/Duke.java | 4 ++-- src/main/java/filedata/FileData.java | 6 ++++-- data/tasks.txt => tasks.txt | 0 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 src/main/java/META-INF/MANIFEST.MF rename data/tasks.txt => tasks.txt (100%) diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..2c9a9745c5 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: duke.Duke + diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index 7a37de9df1..a3a4bb82ef 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -14,7 +14,7 @@ public class Duke { private Ui ui; public Duke(String filePath) { - System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?"); + System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?\n"); storage = new Storage(filePath); try { tasks = new TaskList(storage.load()); @@ -45,7 +45,7 @@ public void run() { } public static void main(String[] args) { - new Duke("data/tasks.txt").run(); + new Duke("tasks.txt").run(); } } diff --git a/src/main/java/filedata/FileData.java b/src/main/java/filedata/FileData.java index 53ad2754d8..c0a3871540 100644 --- a/src/main/java/filedata/FileData.java +++ b/src/main/java/filedata/FileData.java @@ -19,8 +19,10 @@ public class FileData { public FileData(String fileName) { - this.fileName = fileName; - this.file = new File(fileName); + String home = System.getProperty("user.home"); + java.nio.file.Path path = java.nio.file.Paths.get(home, "Desktop", fileName); + this.fileName = String.valueOf(path); + this.file = new File(String.valueOf(path)); this.tasks = this.storeArray(); } diff --git a/data/tasks.txt b/tasks.txt similarity index 100% rename from data/tasks.txt rename to tasks.txt From 622b3e51a33c341772059b1eebfbfec51acc30a0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Mon, 29 Aug 2022 21:39:04 +0800 Subject: [PATCH 16/35] Add JavaDoc comments to most of the code --- src/main/java/command/AddCommand.java | 31 +++++++++++++- src/main/java/command/ByeCommand.java | 26 +++++++++++- src/main/java/command/Command.java | 23 +++++++++- src/main/java/command/DeleteCommand.java | 25 +++++++++++ src/main/java/command/EditCommand.java | 25 +++++++++++ src/main/java/command/FalseCommand.java | 27 +++++++++++- src/main/java/command/ListCommand.java | 24 +++++++++++ src/main/java/dateformat/DateFormat.java | 54 ++++++++++++++++++++---- src/main/java/parser/Parser.java | 18 ++++++++ src/main/java/task/Deadline.java | 29 +++++++++++++ src/main/java/task/Event.java | 29 +++++++++++++ src/main/java/task/Task.java | 32 ++++++++++++++ src/main/java/task/TaskList.java | 47 ++++++++++++++++++--- src/main/java/task/Todo.java | 29 ++++++++++++- 14 files changed, 399 insertions(+), 20 deletions(-) diff --git a/src/main/java/command/AddCommand.java b/src/main/java/command/AddCommand.java index a02027cfd5..263c8e8106 100644 --- a/src/main/java/command/AddCommand.java +++ b/src/main/java/command/AddCommand.java @@ -9,18 +9,45 @@ import task.Deadline; import task.Event; +/** + * Represents an Add Command that inherits from + * the abstract class Command. + */ + public class AddCommand extends Command { protected String commandLine; - public AddCommand(String str) { - this.commandLine = str; + /** + * Constructor for this AddCommand that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ + public AddCommand(String commandLine) { + this.commandLine = commandLine; } + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ @Override public boolean isExit() { return false; } + /** + * Executes the command depending on which type of + * task it is and prints a string to tell the user that + * the task has been added. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException If the description of task is empty. + */ @Override public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { if (commandLine.startsWith("todo")) { diff --git a/src/main/java/command/ByeCommand.java b/src/main/java/command/ByeCommand.java index 92fabd5a6c..2ac77d0dd1 100644 --- a/src/main/java/command/ByeCommand.java +++ b/src/main/java/command/ByeCommand.java @@ -4,20 +4,44 @@ import task.TaskList; import ui.Ui; +/** + * Represents a Bye Command that inherits from + * the abstract class Command. + */ public class ByeCommand extends Command { protected String commandLine; + /** + * Constructor for this that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ public ByeCommand(String commandLine) { this.commandLine = commandLine; } + /** + * Returns a boolean true to show that this + * is the last command. + * + * @return true. + */ @Override public boolean isExit() { return true; } + /** + * Executes the command and prints a goodbye + * string to the user. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + */ @Override - public void execute(TaskList task, Ui ui, Storage storage) { + public void execute(TaskList taskList, Ui ui, Storage storage) { ui.showGoodbye(); } } diff --git a/src/main/java/command/Command.java b/src/main/java/command/Command.java index 97312ee12c..4dbd15fc18 100644 --- a/src/main/java/command/Command.java +++ b/src/main/java/command/Command.java @@ -4,7 +4,28 @@ import task.TaskList; import ui.Ui; +/** + * An abstract class Command. + */ public abstract class Command { + + /** + * An abstract method that is implemented in its + * children classes returns a boolean depending on whether + * it is the last command from the user. + * + * @return boolean. + */ public abstract boolean isExit(); - public abstract void execute(TaskList task, Ui ui, Storage storage); + + /** + * An abstract method that is implemented in its + * children classes that executes the command from the user + * differently depending on what command the user gives. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + */ + public abstract void execute(TaskList taskList, Ui ui, Storage storage); } diff --git a/src/main/java/command/DeleteCommand.java b/src/main/java/command/DeleteCommand.java index 599ee56046..7dd7511396 100644 --- a/src/main/java/command/DeleteCommand.java +++ b/src/main/java/command/DeleteCommand.java @@ -6,18 +6,43 @@ import exception.DukeException; import task.Task; +/** + * Represents a Delete Command that inherits from + * the abstract class Command. + */ public class DeleteCommand extends Command { protected String commandLine; + /** + * Constructor for this DeleteCommand that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ public DeleteCommand(String commandLine) { this.commandLine = commandLine; } + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ @Override public boolean isExit() { return false; } + /** + * Executes the command to delete a task that the user + * wants to remove. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException If there are no such task in the taskList. + */ @Override public void execute(TaskList taskList, Ui ui, Storage storage) { int index = Integer.parseInt(commandLine.substring(7)) - 1; diff --git a/src/main/java/command/EditCommand.java b/src/main/java/command/EditCommand.java index 4a32c3001b..ec787a6186 100644 --- a/src/main/java/command/EditCommand.java +++ b/src/main/java/command/EditCommand.java @@ -6,18 +6,43 @@ import exception.DukeException; import task.Task; +/** + * Represents an EditCommand that inherits from + * the abstract class Command. + */ public class EditCommand extends Command { protected String commandLine; + /** + * Constructor for this EditCommand that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ public EditCommand(String commandLine) { this.commandLine = commandLine; } + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ @Override public boolean isExit() { return false; } + /** + * Executes the command depending on which action the user + * wants to do and prints a string if it is executed successfully. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException If there is no such task. + */ @Override public void execute(TaskList taskList, Ui ui, Storage storage) { if (commandLine.startsWith("mark")) { diff --git a/src/main/java/command/FalseCommand.java b/src/main/java/command/FalseCommand.java index cc604b6ec4..c101e11cd4 100644 --- a/src/main/java/command/FalseCommand.java +++ b/src/main/java/command/FalseCommand.java @@ -5,20 +5,45 @@ import ui.Ui; import exception.DukeException; +/** + * Represents a FalseCommand that inherits from + * the abstract class Command. + */ public class FalseCommand extends Command { protected String commandLine; + /** + * Constructor for this FalseCommand that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ public FalseCommand(String commandLine) { this.commandLine = commandLine; } + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ @Override public boolean isExit() { return false; } + /** + * Throws a DukeException to tell the user that the command is + * invalid. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException Always. + */ @Override - public void execute(TaskList task, Ui ui, Storage storage) throws DukeException { + public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { try { throw new DukeException("I'm sorry, but I don't know what that means :-(\n"); } catch (DukeException e) { diff --git a/src/main/java/command/ListCommand.java b/src/main/java/command/ListCommand.java index f4be35e5ca..894fc6966c 100644 --- a/src/main/java/command/ListCommand.java +++ b/src/main/java/command/ListCommand.java @@ -5,18 +5,42 @@ import ui.Ui; import exception.DukeException; +/** + * Represents a ListCommand that inherits from + * the abstract class Command. + */ public class ListCommand extends Command { protected String commandLine; + /** + * Constructor for this ListCommand that takes in a + * commandLine as a String. + * + * @param commandLine Command from the user. + */ public ListCommand(String commandLine) { this.commandLine = commandLine; } + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ @Override public boolean isExit() { return false; } + /** + * Prints out all the tasks from the taskList if successful. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException If the taskList is empty. + */ @Override public void execute(TaskList taskList, Ui ui, Storage storage) { try { diff --git a/src/main/java/dateformat/DateFormat.java b/src/main/java/dateformat/DateFormat.java index 3946136880..56fc5d80d9 100644 --- a/src/main/java/dateformat/DateFormat.java +++ b/src/main/java/dateformat/DateFormat.java @@ -8,7 +8,9 @@ import java.util.HashMap; import java.util.Locale; - +/** + * Represents DateFormat to format date and time. + */ public class DateFormat { protected String date; protected LocalDate dateFormatted; @@ -19,18 +21,18 @@ public class DateFormat { protected LocalDateTime dateAndTime; protected HashMap months = new HashMap<>(); + /** + * Constructor for DateFormat that takes in a date + * as a String. + * + * @param date Date in the format of a String. + */ public DateFormat(String date) { this.afterBy = date; this.date = date; this.dateFormatted = null; this.timeFormatted = null; - - String day; - String month; - String year; - String hour; - String minutes; - String time = ""; + dateAndTimeFormatter(); months.put("JAN", "1"); months.put("FEB", "2"); @@ -44,8 +46,19 @@ public DateFormat(String date) { months.put("OCT", "10"); months.put("NOV", "11"); months.put("DEC", "12"); + } - + /** + * A formatter to format the date and time + * into a readable String for the DateTimeFormatterBuilder. + */ + public void dateAndTimeFormatter() { + String day; + String month; + String year; + String hour; + String minutes; + String time = ""; if (this.afterBy.contains("/")) { if (this.afterBy.indexOf("/") <= 2) { int afterDaySlashIndex = afterBy.indexOf("/"); @@ -307,16 +320,39 @@ public DateFormat(String date) { } } + + /** + * Formats the date in the form of a String into + * a date in the form of LocalDate. + * + * @param pattern The pattern in which the date will be formatted to. + * @return Returns the String version of the date after it has been + * formatted. + */ public String formatDate(String pattern) { DateTimeFormatter df = new DateTimeFormatterBuilder().parseCaseInsensitive() .appendPattern(pattern).toFormatter(Locale.ENGLISH); return this.dateFormatted.format(df); } + /** + * Formats the time in the form of a String into + * a time in the form of LocalTime. + * + * @return Returns the String version of the time after it has + * been formatted. + */ public String formatTime() { return this.timeFormatted.format(DateTimeFormatter.ISO_TIME); } + /** + * Returns the string representation of the formatted date + * and time. + * + * @return The string representation of the formatted date + * and time. + */ @Override public String toString() { if (this.timeFormatted == null) { diff --git a/src/main/java/parser/Parser.java b/src/main/java/parser/Parser.java index fcc731d158..868e8aa1ed 100644 --- a/src/main/java/parser/Parser.java +++ b/src/main/java/parser/Parser.java @@ -8,13 +8,31 @@ import command.FalseCommand; import command.ListCommand; +/** + * Represents a parser to parse commands from + * the user. + */ public class Parser { protected String fullCommand; + /** + * Constructor for this Parser that takes in + * a command as a string. + * + * @param fullCommand Command from the user. + */ public Parser(String fullCommand) { this.fullCommand = fullCommand; } + /** + * Returns different types of commands depending on what + * command the user input. + * + * @param fullCommand Command from the user. + * @return Different types of commands depending on the + * user input. + */ public Command parse(String fullCommand) { if (fullCommand.isEmpty() || fullCommand.equals("bye")) { return new ByeCommand(fullCommand); diff --git a/src/main/java/task/Deadline.java b/src/main/java/task/Deadline.java index 078d951d9a..04b209aa37 100644 --- a/src/main/java/task/Deadline.java +++ b/src/main/java/task/Deadline.java @@ -2,24 +2,53 @@ import dateformat.DateFormat; +/** + * Represents a Deadline task that inherits + * from Task. + */ public class Deadline extends Task { protected String description; protected boolean isDone; protected DateFormat date; + /** + * Constructor for this Deadline task. + * + * @param description The Deadline task. + * @param date The date for the Deadline task. + */ public Deadline(String description, String date) { this.description = description; this.date = new DateFormat(date); } + /** + * Changes the boolean isDone depending on whether the user + * wants to mark or unmark the task. + * + * @param bool The boolean for whether the task is marked + * or unmarked. + */ public void isMark(boolean bool) { this.isDone = bool; } + /** + * Returns a string representation of whether + * the Deadline task is done or undone. + * + * @return Returns a string representation of whether + * the Deadline task is done or undone. + */ public String getStatusIcon() { return (isDone ? "X" : " "); // mark done task with X } + /** + * Returns the string representation of the Deadline task. + * + * @return Returns the string representation of the Deadline task. + */ @Override public String toString() { return "[D][" + this.getStatusIcon() + "] " + diff --git a/src/main/java/task/Event.java b/src/main/java/task/Event.java index 48cab7558d..1b08f041af 100644 --- a/src/main/java/task/Event.java +++ b/src/main/java/task/Event.java @@ -2,24 +2,53 @@ import dateformat.DateFormat; +/** + * Represents an Event task that inherits + * from Task. + */ public class Event extends Task { protected String description; protected boolean isDone; protected DateFormat date; + /** + * Constructor for this Event task. + * + * @param description The Event task. + * @param date The date for the Event task. + */ public Event(String description, String date) { this.description = description; this.date = new DateFormat(date); } + /** + * Changes the boolean isDone depending on whether the user + * wants to mark or unmark the Event task. + * + * @param bool The boolean for whether the Event task is marked + * or unmarked. + */ public void isMark(boolean bool) { this.isDone = bool; } + /** + * Returns a string representation of whether + * the Event task is done or undone. + * + * @return Returns a string representation of whether + * the Event task is done or undone. + */ public String getStatusIcon() { return (isDone ? "X" : " "); // mark done task with X } + /** + * Returns the string representation of the Event task. + * + * @return Returns the string representation of the Event task. + */ @Override public String toString() { return "[E][" + this.getStatusIcon() + "] " + diff --git a/src/main/java/task/Task.java b/src/main/java/task/Task.java index a68b6c8047..2dc0f0f9c6 100644 --- a/src/main/java/task/Task.java +++ b/src/main/java/task/Task.java @@ -1,26 +1,58 @@ package task; +/** + * Represents all the tasks. + */ public class Task { protected String description; protected boolean isDone; protected String date; + /** + * Changes the boolean isDone depending on whether the user + * wants to mark or unmark the task. + * + * @param bool The boolean for whether the task is marked + * or unmarked. + */ public void isMark(boolean bool) { this.isDone = bool; } + /** + * Returns the description of the task. + * + * @return Returns the description of the task. + */ public String getDescription() { return this.description; } + /** + * Sets the date for the task. + * + * @param str The date of the task. + */ public void setDate(String str) { this.date = str; } + /** + * Returns a string representation of whether + * the task is done or undone. + * + * @return Returns a string representation of whether + * the task is done or undone. + */ public String getStatusIcon() { return (isDone ? "X" : " "); // mark done task with X } + /** + * Returns the string representation of the task. + * + * @return Returns the string representation of the task. + */ public String toString() { return this.description; } diff --git a/src/main/java/task/TaskList.java b/src/main/java/task/TaskList.java index 8af2bdbc28..243e60a669 100644 --- a/src/main/java/task/TaskList.java +++ b/src/main/java/task/TaskList.java @@ -4,43 +4,80 @@ import java.util.ArrayList; +/** + * Represents the TaskList. + */ public class TaskList { protected Task task; protected ArrayList taskList; - public TaskList(ArrayList tasks) throws DukeException { + /** + * Constructor for TaskList if there is a ArrayList. + * + * @param tasks ArrayList of the tasks. + */ + public TaskList(ArrayList tasks) { this.taskList = tasks; } + /** + * Constructor for TaskList if there is no ArrayList. + */ public TaskList() { this.taskList = new ArrayList<>(100); } + /** + * Returns the task at the index provided. + * + * @param index The index of the task to be returned. + * @return Returns the task at the index provided. + */ public Task get(int index) { return this.taskList.get(index); } - public void update() { - - } - + /** + * Adds the task to the taskList. + * + * @param task Task to be added to the taskList. + */ public void add(Task task) { taskList.add(task); } + /** + * Prints out all the tasks in the taskList. + */ public void forEach() { taskList.forEach(n -> System.out.println((taskList.indexOf(n) + 1) + "." + n.toString())); } + /** + * Removes the task at the index provided. + * + * @param index The index of the task to be removed. + */ public void remove(int index) { taskList.remove(index); } + /** + * Changes the taskList to an ArrayList. + * + * @return An ArrayList containing all the tasks in the + * taskList. + */ public ArrayList toArray() { return this.taskList; } + /** + * Returns the size of the taskList. + * + * @return Returns the size of the taskList. + */ public int size() { return this.taskList.size(); } diff --git a/src/main/java/task/Todo.java b/src/main/java/task/Todo.java index b78273e256..d80cc3bf5b 100644 --- a/src/main/java/task/Todo.java +++ b/src/main/java/task/Todo.java @@ -1,22 +1,49 @@ package task; - +/** + * Represents a Todo task that inherits + * from Task. + */ public class Todo extends Task { protected String description; protected boolean isDone; + /** + * Constructor for this Todo task. + * + * @param description The Todo task. + */ public Todo(String description) { this.description = description; } + /** + * Changes the boolean isDone depending on whether the user + * wants to mark or unmark the Todo task. + * + * @param bool The boolean for whether the Todo task is marked + * or unmarked. + */ public void isMark(boolean bool) { this.isDone = bool; } + /** + * Returns a string representation of whether + * the Todo task is done or undone. + * + * @return Returns a string representation of whether + * the Todo task is done or undone. + */ public String getStatusIcon() { return (isDone ? "X" : " "); // mark done task with X } + /** + * Returns the string representation of the Todo task. + * + * @return Returns the string representation of the Todo task. + */ @Override public String toString() { return "[T][" + this.getStatusIcon() + "] " + From 42efcef911d81fd56cbf4a0b66fffccda353d6ed Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Mon, 29 Aug 2022 23:01:56 +0800 Subject: [PATCH 17/35] Add Find feature --- src/main/java/command/FindCommand.java | 66 ++++++++++++++++++++++++++ src/main/java/parser/Parser.java | 10 ++-- src/main/java/ui/Ui.java | 5 -- 3 files changed, 69 insertions(+), 12 deletions(-) create mode 100644 src/main/java/command/FindCommand.java diff --git a/src/main/java/command/FindCommand.java b/src/main/java/command/FindCommand.java new file mode 100644 index 0000000000..0fbb01f5f9 --- /dev/null +++ b/src/main/java/command/FindCommand.java @@ -0,0 +1,66 @@ +package command; + +import storage.Storage; +import task.TaskList; +import ui.Ui; +import exception.DukeException; +import task.Task; + +import java.util.ArrayList; + +public class FindCommand extends Command { + protected String fullCommand; + + public FindCommand(String fullCommand) { + this.fullCommand = fullCommand; + } + + /** + * Returns a boolean false to show that this + * is not the last command. + * + * @return false. + */ + @Override + public boolean isExit() { + return false; + } + + /** + * Executes the command depending on which type of + * task it is and prints a string to tell the user that + * the task has been added. + * + * @param taskList The ArrayList that contains all the tasks. + * @param ui The Ui that interacts with the next command from the user. + * @param storage The Storage used to store the tasks. + * @throws DukeException If the description of task is empty. + */ + @Override + public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + try { + if (taskList.size() == 0) { + throw new DukeException("There are no tasks in your list. :)"); + } else { + String taskToFind = this.fullCommand.substring(5); + ArrayList tasksFound = new ArrayList<>(taskList.size()); + for (int i = 0; i < taskList.size(); i++) { + Task currTask = taskList.get(i); + String currTaskString = currTask.toString(); + if (currTaskString.contains(taskToFind)) { + tasksFound.add(currTask); + } + } + if (tasksFound.isEmpty()) { + throw new DukeException("There is nothing that matches the task."); + } else { + System.out.println("Here are the matching tasks in your list:"); + tasksFound.forEach(n -> System.out.println((tasksFound.indexOf(n) + 1) + "." + + n.toString())); + } + } + } catch (DukeException e) { + System.out.println(e.toString()); + } + } +} diff --git a/src/main/java/parser/Parser.java b/src/main/java/parser/Parser.java index 868e8aa1ed..29f05b7b92 100644 --- a/src/main/java/parser/Parser.java +++ b/src/main/java/parser/Parser.java @@ -1,12 +1,6 @@ package parser; -import command.AddCommand; -import command.ByeCommand; -import command.Command; -import command.DeleteCommand; -import command.EditCommand; -import command.FalseCommand; -import command.ListCommand; +import command.*; /** * Represents a parser to parse commands from @@ -45,6 +39,8 @@ public Command parse(String fullCommand) { } else if (fullCommand.startsWith("todo") || fullCommand.startsWith("deadline") || fullCommand.startsWith("event")) { return new AddCommand(fullCommand); + } else if (fullCommand.startsWith("find")) { + return new FindCommand(fullCommand); } else { return new FalseCommand(fullCommand); } diff --git a/src/main/java/ui/Ui.java b/src/main/java/ui/Ui.java index ecba907218..4f535dcf2b 100644 --- a/src/main/java/ui/Ui.java +++ b/src/main/java/ui/Ui.java @@ -13,11 +13,6 @@ public Ui() { this.nextCommand = in.nextLine(); } - public Ui(Scanner in) { - this.in = in; - this.nextCommand = in.nextLine(); - } - public void showWelcome() { System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?\n"); } From a94bf3bf5cc360d8fd7b0158996c6ce10c27c4f8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Thu, 1 Sep 2022 09:23:58 +0800 Subject: [PATCH 18/35] Fix some minor bugs in DateFormat --- src/main/java/dateformat/DateFormat.java | 9 +++++---- src/main/java/duke/Duke.java | 2 +- src/main/java/filedata/FileData.java | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/dateformat/DateFormat.java b/src/main/java/dateformat/DateFormat.java index 56fc5d80d9..a9c68addf3 100644 --- a/src/main/java/dateformat/DateFormat.java +++ b/src/main/java/dateformat/DateFormat.java @@ -19,7 +19,7 @@ public class DateFormat { protected String stringDate; protected String stringTime; protected LocalDateTime dateAndTime; - protected HashMap months = new HashMap<>(); + protected static HashMap months = new HashMap<>(); /** * Constructor for DateFormat that takes in a date @@ -32,7 +32,6 @@ public DateFormat(String date) { this.date = date; this.dateFormatted = null; this.timeFormatted = null; - dateAndTimeFormatter(); months.put("JAN", "1"); months.put("FEB", "2"); @@ -46,6 +45,8 @@ public DateFormat(String date) { months.put("OCT", "10"); months.put("NOV", "11"); months.put("DEC", "12"); + + dateAndTimeFormatter(); } /** @@ -216,7 +217,7 @@ public void dateAndTimeFormatter() { } } } else { - this.afterBy = this.afterBy.substring(1); + afterBy = afterBy.substring(1); // When read from text file, it has an extra ":". if (this.afterBy.indexOf(" ") < 2) { int afterDaySpaceIndex = afterBy.indexOf(" "); String afterDay; @@ -363,7 +364,7 @@ public String toString() { } public static void main(String args[]) { - DateFormat d4 = new DateFormat("16/10/2021 1800"); + DateFormat d4 = new DateFormat("Feb 10 2022 1800"); System.out.println(d4.formatDate("MMM d yyyy")); System.out.println(d4.formatTime()); } diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index a3a4bb82ef..f963922a91 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -14,7 +14,7 @@ public class Duke { private Ui ui; public Duke(String filePath) { - System.out.println("Hello! I'm Duke.Duke\nWhat can I do for you?\n"); + System.out.println("Hello! I'm Duke.\nWhat can I do for you?\n"); storage = new Storage(filePath); try { tasks = new TaskList(storage.load()); diff --git a/src/main/java/filedata/FileData.java b/src/main/java/filedata/FileData.java index c0a3871540..2d35a74bef 100644 --- a/src/main/java/filedata/FileData.java +++ b/src/main/java/filedata/FileData.java @@ -62,7 +62,7 @@ public ArrayList allTasks() { public ArrayList storeArray() { ArrayList tasks = new ArrayList<>(100); - try { + try { if (!this.file.exists()) { throw new FileNotFoundException(); } else { From 639a81757ba7fe2064f2ffb27ce09c563e4a02e6 Mon Sep 17 00:00:00 2001 From: Hoodineee <97339748+Hoodineee@users.noreply.github.com> Date: Sat, 3 Sep 2022 00:24:45 +0800 Subject: [PATCH 19/35] Update README.md --- README.md | 57 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index a8111be768..633b0e4f76 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,33 @@ -# duke.duke project template - -This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. - -## Setting up in Intellij - -Prerequisites: JDK 11, update Intellij to the most recent version. - -1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first) -1. Open the project into Intellij as follows: - 1. Click `Open`. - 1. Select the project directory, and click `OK`. - 1. If there are any further prompts, accept the defaults. -1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).
- In the same dialog, set the **Project language level** field to the `SDK default` option. -3. After that, locate the `src/main/java/duke.duke.java` file, right-click it, and choose `Run duke.duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output: - ``` - Hello from - ____ _ - | _ \ _ _| | _____ - | | | | | | | |/ / _ \ - | |_| | |_| | < __/ - |____/ \__,_|_|\_\___| - ``` +# DukePro +> “Your mind is for having ideas, not holding them.” – David Allen ([source](https://dansilvestre.com/productivity-quotes)) + +DukePro frees your mind of having to remember things you need to do. It's, + +- text-based +- easy to learn +- ~~FAST~~ *SUPER* FAST to use + +All you need to do is, + +1. download it from [here](https://github.com/Hoodineee/ip). +2. double-click it. +3. add your tasks. +4. let it manage your tasks for you :wink: + +And it is **FREE**! + +Features: + +- [x] Managing tasks +- [ ] Managing deadlines (coming soon) +- [ ] Reminders (coming soon) + +If you Java programmer, you can use it to practice Java too. Here's the main method: +``` + +public class Main { + public static void main(String[] args) { + Application.launch(MainApp.class, args); + } +} +``` From ffb6cf7eefe705b869090f71d46d7b94105c3788 Mon Sep 17 00:00:00 2001 From: Hoodineee <97339748+Hoodineee@users.noreply.github.com> Date: Sat, 3 Sep 2022 00:27:32 +0800 Subject: [PATCH 20/35] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 633b0e4f76..ad4939fe8d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Features: - [ ] Managing deadlines (coming soon) - [ ] Reminders (coming soon) -If you Java programmer, you can use it to practice Java too. Here's the main method: +If you Java programmer, you can use it to practice Java too. Here's the `main` method: ``` public class Main { From eab27763b296483ab8dd86d25fcc6b83f389bd06 Mon Sep 17 00:00:00 2001 From: Hoodineee <97339748+Hoodineee@users.noreply.github.com> Date: Sat, 3 Sep 2022 00:28:49 +0800 Subject: [PATCH 21/35] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index ad4939fe8d..7fe7178ece 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ Features: - [ ] Reminders (coming soon) If you Java programmer, you can use it to practice Java too. Here's the `main` method: -``` - +```java public class Main { public static void main(String[] args) { Application.launch(MainApp.class, args); From baa72388a7edd302ca14cb903a4821e1af2434d0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-LBC8HLP\\User" Date: Sat, 3 Sep 2022 22:56:55 +0800 Subject: [PATCH 22/35] Add a GUI to Duke --- build.gradle | 15 +++++ data/{test.txt => duke.txt} | 0 src/main/java/GUI/DialogBox.java | 61 +++++++++++++++++++++ src/main/java/GUI/MainWindow.java | 53 ++++++++++++++++++ src/main/java/command/AddCommand.java | 34 ++++++++---- src/main/java/command/ByeCommand.java | 3 +- src/main/java/command/Command.java | 2 +- src/main/java/command/DeleteCommand.java | 12 ++-- src/main/java/command/EditCommand.java | 17 ++++-- src/main/java/command/FalseCommand.java | 4 +- src/main/java/command/FindCommand.java | 16 +++++- src/main/java/command/ListCommand.java | 12 +++- src/main/java/dateformat/DateFormat.java | 26 ++++++--- src/main/java/duke/Duke.java | 9 ++- src/main/java/duke/Launcher.java | 12 ++++ src/main/java/duke/Main.java | 37 +++++++++++++ src/main/java/exception/DukeException.java | 2 +- src/main/java/parser/Parser.java | 14 ++++- src/main/java/ui/Ui.java | 4 +- src/main/resources/images/DaDuke.png | Bin 0 -> 16526 bytes src/main/resources/images/DaUser.png | Bin 0 -> 5218 bytes src/main/resources/view/DialogBox.fxml | 16 ++++++ src/main/resources/view/MainWindow.fxml | 19 +++++++ 23 files changed, 323 insertions(+), 45 deletions(-) rename data/{test.txt => duke.txt} (100%) create mode 100644 src/main/java/GUI/DialogBox.java create mode 100644 src/main/java/GUI/MainWindow.java create mode 100644 src/main/java/duke/Launcher.java create mode 100644 src/main/java/duke/Main.java create mode 100644 src/main/resources/images/DaDuke.png create mode 100644 src/main/resources/images/DaUser.png create mode 100644 src/main/resources/view/DialogBox.fxml create mode 100644 src/main/resources/view/MainWindow.fxml diff --git a/build.gradle b/build.gradle index 885198fcfa..fad401f369 100644 --- a/build.gradle +++ b/build.gradle @@ -9,6 +9,21 @@ repositories { } dependencies { + 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' + 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' } diff --git a/data/test.txt b/data/duke.txt similarity index 100% rename from data/test.txt rename to data/duke.txt diff --git a/src/main/java/GUI/DialogBox.java b/src/main/java/GUI/DialogBox.java new file mode 100644 index 0000000000..1ce498edc4 --- /dev/null +++ b/src/main/java/GUI/DialogBox.java @@ -0,0 +1,61 @@ +package GUI; + +import java.io.IOException; +import java.util.Collections; + +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.fxml.FXML; +import javafx.fxml.FXMLLoader; +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; + +/** + * An example of a custom control using FXML. + * This control represents a dialog box consisting of an ImageView to represent the speaker's face and a label + * containing text from the speaker. + */ +public class DialogBox extends HBox { + @FXML + private Label dialog; + @FXML + private ImageView displayPicture; + + private DialogBox(String text, Image img) { + try { + FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource("/view/DialogBox.fxml")); + fxmlLoader.setController(this); + fxmlLoader.setRoot(this); + fxmlLoader.load(); + } catch (IOException e) { + e.printStackTrace(); + } + + dialog.setText(text); + displayPicture.setImage(img); + } + + /** + * Flips the dialog box such that the ImageView is on the left and text on the right. + */ + private void flip() { + ObservableList tmp = FXCollections.observableArrayList(this.getChildren()); + Collections.reverse(tmp); + getChildren().setAll(tmp); + setAlignment(Pos.TOP_LEFT); + } + + public static DialogBox getUserDialog(String text, Image img) { + return new DialogBox(text, img); + } + + public static DialogBox getDukeDialog(String text, Image img) { + var db = new DialogBox(text, img); + db.flip(); + return db; + } +} \ No newline at end of file diff --git a/src/main/java/GUI/MainWindow.java b/src/main/java/GUI/MainWindow.java new file mode 100644 index 0000000000..358645368f --- /dev/null +++ b/src/main/java/GUI/MainWindow.java @@ -0,0 +1,53 @@ +package GUI; + +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.VBox; +/** + * Controller for MainWindow. Provides the layout for the other controls. + */ +public class MainWindow extends VBox { + @FXML + private ScrollPane scrollPane; + @FXML + private VBox dialogContainer; + @FXML + private TextField userInput; + @FXML + private Button sendButton; + + private Duke duke; + + private Image userImage = new Image(this.getClass().getResourceAsStream("/images/DaUser.png")); + private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/DaDuke.png")); + + @FXML + public void initialize() { + scrollPane.vvalueProperty().bind(dialogContainer.heightProperty()); + dialogContainer.getChildren().add(DialogBox.getDukeDialog + ("Hello! I'm Duck\n" + "What can I do for you?", this.dukeImage)); + } + + public void setDuke(Duke d) { + duke = d; + } + + /** + * Creates two dialog boxes, one echoing user input and the other containing Duke's reply 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) + ); + userInput.clear(); + } +} \ No newline at end of file diff --git a/src/main/java/command/AddCommand.java b/src/main/java/command/AddCommand.java index 263c8e8106..3e4df9db33 100644 --- a/src/main/java/command/AddCommand.java +++ b/src/main/java/command/AddCommand.java @@ -49,7 +49,8 @@ public boolean isExit() { * @throws DukeException If the description of task is empty. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + public String execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + String response = ""; if (commandLine.startsWith("todo")) { try { if (commandLine.length() <= 4) { @@ -59,12 +60,15 @@ public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExcept Task currTask = new Todo(actTask); taskList.add(currTask); storage.updateData(taskList); - System.out.println("Got it. I've added this task:\n" + - " " + currTask + "\n" + - "Now you have " + taskList.size() + " tasks in the list.\n"); + response = "Got it. I've added this task:\n" + + " " + currTask + "\n" + "Now you have " + + taskList.size() + " tasks in the list.\n"; + System.out.println(response); + return response; } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } else if (commandLine.startsWith("deadline")) { try { @@ -72,7 +76,7 @@ public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExcept throw new DukeException("The description of a deadline cannot be empty."); } else { if (!commandLine.contains("/")) { - System.out.println("There is no date! >:(\n"); + throw new DukeException("There is no date! >:(\n"); } else { int slashIndex = commandLine.indexOf("/"); String actTask = commandLine.substring(9, slashIndex - 1); @@ -80,15 +84,18 @@ public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExcept Task currTask = new Deadline(actTask, taskDate); taskList.add(currTask); storage.updateData(taskList); - System.out.println("Got it. I've added this task:\n" + - " " + currTask + "\n" + - "Now you have " + taskList.size() + " tasks in the list.\n"); + response = "Got it. I've added this task:\n" + + " " + currTask + "\n" + "Now you have " + + taskList.size() + " tasks in the list.\n"; + System.out.println(response); + return response; } } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } - } else if (commandLine.startsWith("event")) { + } else { try { if (commandLine.length() <= 5) { throw new DukeException("The description of a event cannot be empty."); @@ -102,13 +109,16 @@ public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExcept Task currTask = new Event(actTask, taskDate); taskList.add(currTask); storage.updateData(taskList); - System.out.println("Got it. I've added this task:\n" + - " " + currTask.toString() + "\n" + - "Now you have " + taskList.size() + " tasks in the list.\n"); + response = "Got it. I've added this task:\n" + + " " + currTask + "\n" + "Now you have " + + taskList.size() + " tasks in the list.\n"; + System.out.println(response); + return response; } } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } } diff --git a/src/main/java/command/ByeCommand.java b/src/main/java/command/ByeCommand.java index 2ac77d0dd1..4802f1278b 100644 --- a/src/main/java/command/ByeCommand.java +++ b/src/main/java/command/ByeCommand.java @@ -41,7 +41,8 @@ public boolean isExit() { * @param storage The Storage used to store the tasks. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) { + public String execute(TaskList taskList, Ui ui, Storage storage) { ui.showGoodbye(); + return "Bye. Hope to see you again soon!"; } } diff --git a/src/main/java/command/Command.java b/src/main/java/command/Command.java index 4dbd15fc18..79cd7b5705 100644 --- a/src/main/java/command/Command.java +++ b/src/main/java/command/Command.java @@ -27,5 +27,5 @@ public abstract class Command { * @param ui The Ui that interacts with the next command from the user. * @param storage The Storage used to store the tasks. */ - public abstract void execute(TaskList taskList, Ui ui, Storage storage); + public abstract String execute(TaskList taskList, Ui ui, Storage storage); } diff --git a/src/main/java/command/DeleteCommand.java b/src/main/java/command/DeleteCommand.java index 7dd7511396..5911e2093d 100644 --- a/src/main/java/command/DeleteCommand.java +++ b/src/main/java/command/DeleteCommand.java @@ -44,7 +44,8 @@ public boolean isExit() { * @throws DukeException If there are no such task in the taskList. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) { + public String execute(TaskList taskList, Ui ui, Storage storage) { + String response = ""; int index = Integer.parseInt(commandLine.substring(7)) - 1; try { if (index > taskList.size() - 1) { @@ -53,12 +54,15 @@ public void execute(TaskList taskList, Ui ui, Storage storage) { Task task = taskList.get(index); taskList.remove(index); storage.updateData(taskList); - System.out.println("Noted. I've removed this task:\n" + - " " + task.toString() + "\n" + "Now you have " + - taskList.size() + " tasks in the list.\n"); + response = "Noted. I've removed this task:\n" + + " " + task.toString() + "\n" + "Now you have " + + taskList.size() + " tasks in the list.\n"; + System.out.println(response); + return response; } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } } diff --git a/src/main/java/command/EditCommand.java b/src/main/java/command/EditCommand.java index ec787a6186..40df2c95d8 100644 --- a/src/main/java/command/EditCommand.java +++ b/src/main/java/command/EditCommand.java @@ -44,7 +44,8 @@ public boolean isExit() { * @throws DukeException If there is no such task. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) { + public String execute(TaskList taskList, Ui ui, Storage storage) { + String response = ""; if (commandLine.startsWith("mark")) { int index = Integer.parseInt(commandLine.substring(5)) - 1; try { @@ -54,11 +55,14 @@ public void execute(TaskList taskList, Ui ui, Storage storage) { Task task = taskList.get(index); task.isMark(true); storage.updateData(taskList); - System.out.println("Nice! I've marked this task as done:\n" + - " " + task + "\n"); + response = "Nice! I've marked this task as done:\n" + + " " + task + "\n"; + System.out.println(response); + return response; } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } else { int index = Integer.parseInt(commandLine.substring(7)) - 1; @@ -69,11 +73,14 @@ public void execute(TaskList taskList, Ui ui, Storage storage) { Task task = taskList.get(index); task.isMark(false); storage.updateData(taskList); - System.out.println("OK, I've marked this task as not done yet:\n" + - " " + task + "\n"); + response = "OK, I've marked this task as not done yet:\n" + + " " + task + "\n"; + System.out.println(response); + return response; } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } } diff --git a/src/main/java/command/FalseCommand.java b/src/main/java/command/FalseCommand.java index c101e11cd4..6d4794db8d 100644 --- a/src/main/java/command/FalseCommand.java +++ b/src/main/java/command/FalseCommand.java @@ -43,12 +43,12 @@ public boolean isExit() { * @throws DukeException Always. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + public String execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { try { throw new DukeException("I'm sorry, but I don't know what that means :-(\n"); } catch (DukeException e) { System.out.println(e.toString()); - ui.nextCommand(); + return e.toString(); } } } diff --git a/src/main/java/command/FindCommand.java b/src/main/java/command/FindCommand.java index 0fbb01f5f9..ed2cd90760 100644 --- a/src/main/java/command/FindCommand.java +++ b/src/main/java/command/FindCommand.java @@ -37,7 +37,8 @@ public boolean isExit() { * @throws DukeException If the description of task is empty. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + public String execute(TaskList taskList, Ui ui, Storage storage) throws DukeException { + String response = ""; try { if (taskList.size() == 0) { throw new DukeException("There are no tasks in your list. :)"); @@ -55,12 +56,21 @@ public void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExcept throw new DukeException("There is nothing that matches the task."); } else { System.out.println("Here are the matching tasks in your list:"); - tasksFound.forEach(n -> System.out.println((tasksFound.indexOf(n) + 1) + "." - + n.toString())); + tasksFound.forEach(n -> System.out.println((tasksFound.indexOf(n) + 1) + + "." + n.toString())); + response = "Here are the matching tasks in your list:\n"; + for (int j = 0; j < tasksFound.size(); j++) { + Task currTaskFound = tasksFound.get(j); + String currTaskFoundString = currTaskFound.toString(); + response += currTaskFoundString; + } + return response; + } } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } } diff --git a/src/main/java/command/ListCommand.java b/src/main/java/command/ListCommand.java index 894fc6966c..9e545442d4 100644 --- a/src/main/java/command/ListCommand.java +++ b/src/main/java/command/ListCommand.java @@ -1,6 +1,7 @@ package command; import storage.Storage; +import task.Task; import task.TaskList; import ui.Ui; import exception.DukeException; @@ -42,7 +43,8 @@ public boolean isExit() { * @throws DukeException If the taskList is empty. */ @Override - public void execute(TaskList taskList, Ui ui, Storage storage) { + public String execute(TaskList taskList, Ui ui, Storage storage) { + String response = ""; try { if (taskList.size() == 0) { throw new DukeException("There are no tasks in your list. :)"); @@ -50,9 +52,17 @@ public void execute(TaskList taskList, Ui ui, Storage storage) { System.out.println("Here are the tasks in your list:"); taskList.forEach(); System.out.println(); + response = "Here are the tasks in your list:\n"; + for (int i = 0; i < taskList.size(); i++) { + Task currTask = taskList.get(i); + String currTaskString = currTask.toString(); + response += currTaskString; + } + return response; } } catch (DukeException e) { System.out.println(e.toString()); + return e.toString(); } } } diff --git a/src/main/java/dateformat/DateFormat.java b/src/main/java/dateformat/DateFormat.java index a9c68addf3..d451aedc74 100644 --- a/src/main/java/dateformat/DateFormat.java +++ b/src/main/java/dateformat/DateFormat.java @@ -75,7 +75,7 @@ public void dateAndTimeFormatter() { String afterMonth; if (afterMonthSlashIndex == 1) { month = "0" + afterDay.charAt(0); - afterMonth = afterDay.substring(afterDaySlashIndex + 1); + afterMonth = afterDay.substring(afterMonthSlashIndex + 1); } else { month = afterDay.substring(0, 2); afterMonth = afterDay.substring(afterMonthSlashIndex + 1); @@ -88,6 +88,7 @@ public void dateAndTimeFormatter() { time = afterMonth.substring(5); } } + } else if (afterBy.indexOf("/") == 3) { month = afterBy.substring(0, 3); int afterMonthSlashIndex = afterBy.indexOf("/"); @@ -139,7 +140,7 @@ public void dateAndTimeFormatter() { } } } else if (this.afterBy.contains("-")) { - if (this.afterBy.indexOf("-") < 2) { + if (this.afterBy.indexOf("-") <= 2) { int afterDayDashIndex = afterBy.indexOf("-"); String afterDay; if (afterDayDashIndex == 1) { @@ -217,8 +218,10 @@ public void dateAndTimeFormatter() { } } } else { - afterBy = afterBy.substring(1); // When read from text file, it has an extra ":". - if (this.afterBy.indexOf(" ") < 2) { + if (afterBy.contains(":")) { + afterBy = afterBy.substring(1); // When read from text file, it has an extra ":". + } + if (this.afterBy.indexOf(" ") <= 2) { int afterDaySpaceIndex = afterBy.indexOf(" "); String afterDay; if (afterDaySpaceIndex == 1) { @@ -245,7 +248,9 @@ public void dateAndTimeFormatter() { time = afterMonth.substring(5); } } - month = months.get(month.toUpperCase()); + if (!month.contains("1") && !month.contains("0")) { + month = months.get(month.toUpperCase()); + } } else if (afterBy.indexOf(" ") == 3) { month = afterBy.substring(0, 3); int afterMonthSpaceIndex = afterBy.indexOf(" "); @@ -267,7 +272,10 @@ public void dateAndTimeFormatter() { time = afterDay.substring(5); } } - month = months.get(month.toUpperCase()); + if (!month.contains("1") && !month.contains("0")) { + month = months.get(month.toUpperCase()); + } + } else { year = afterBy.substring(0, 4); int afterYearSpaceIndex = afterBy.indexOf(" "); @@ -296,7 +304,9 @@ public void dateAndTimeFormatter() { time = afterDay.substring(5); } } - month = months.get(month.toUpperCase()); + if (!month.contains("1") && !month.contains("0")) { + month = months.get(month.toUpperCase()); + } } } if (month.length() == 1) { @@ -364,7 +374,7 @@ public String toString() { } public static void main(String args[]) { - DateFormat d4 = new DateFormat("Feb 10 2022 1800"); + DateFormat d4 = new DateFormat("30 08 2022 1800"); System.out.println(d4.formatDate("MMM d yyyy")); System.out.println(d4.formatTime()); } diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index f963922a91..5db9a1ed4d 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -14,11 +14,9 @@ public class Duke { private Ui ui; public Duke(String filePath) { - System.out.println("Hello! I'm Duke.\nWhat can I do for you?\n"); storage = new Storage(filePath); try { tasks = new TaskList(storage.load()); - ui = new Ui(); } catch (DukeException e) { ui.showLoadingError(); tasks = new TaskList(); @@ -44,6 +42,13 @@ public void run() { } } + public String getResponse(String input) { + Parser parser = new Parser(input); + Command c = parser.parse(input); + String response = c.execute(tasks, ui, storage); + return response; + } + public static void main(String[] args) { new Duke("tasks.txt").run(); } diff --git a/src/main/java/duke/Launcher.java b/src/main/java/duke/Launcher.java new file mode 100644 index 0000000000..5483e63637 --- /dev/null +++ b/src/main/java/duke/Launcher.java @@ -0,0 +1,12 @@ +package duke; + +import javafx.application.Application; + +/** + * A launcher class to workaround classpath issues. + */ +public class Launcher { + public static void main(String[] args) { + Application.launch(Main.class, args); + } +} \ No newline at end of file diff --git a/src/main/java/duke/Main.java b/src/main/java/duke/Main.java new file mode 100644 index 0000000000..94446c08d5 --- /dev/null +++ b/src/main/java/duke/Main.java @@ -0,0 +1,37 @@ +package duke; + +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import GUI.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 Duke duke = new Duke("tasks.txt"); + + @Override + public void start(Stage stage) { + try { + Path path = Paths.get("MainWindow.fxml"); + System.out.println(path.toAbsolutePath()); + FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("/view/MainWindow.fxml")); + AnchorPane ap = fxmlLoader.load(); + Scene scene = new Scene(ap); + stage.setTitle("DontTouchMeDuck"); + stage.setScene(scene); + fxmlLoader.getController().setDuke(duke); + stage.show(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src/main/java/exception/DukeException.java b/src/main/java/exception/DukeException.java index e147a5bb35..1bc1cb36e5 100644 --- a/src/main/java/exception/DukeException.java +++ b/src/main/java/exception/DukeException.java @@ -1,6 +1,6 @@ package exception; -public class DukeException extends IllegalArgumentException{ +public class DukeException extends IllegalArgumentException { protected String message; public DukeException(String message) { diff --git a/src/main/java/parser/Parser.java b/src/main/java/parser/Parser.java index 29f05b7b92..5f7b6a1c30 100644 --- a/src/main/java/parser/Parser.java +++ b/src/main/java/parser/Parser.java @@ -1,6 +1,13 @@ package parser; -import command.*; +import command.Command; +import command.AddCommand; +import command.ByeCommand; +import command.DeleteCommand; +import command.EditCommand; +import command.FalseCommand; +import command.FindCommand; +import command.ListCommand; /** * Represents a parser to parse commands from @@ -36,8 +43,9 @@ public Command parse(String fullCommand) { return new DeleteCommand(fullCommand); } else if (fullCommand.startsWith("mark") || fullCommand.startsWith("unmark")) { return new EditCommand(fullCommand); - } else if (fullCommand.startsWith("todo") || fullCommand.startsWith("deadline") || - fullCommand.startsWith("event")) { + } else if (fullCommand.startsWith("todo") + || fullCommand.startsWith("deadline") + || fullCommand.startsWith("event")) { return new AddCommand(fullCommand); } else if (fullCommand.startsWith("find")) { return new FindCommand(fullCommand); diff --git a/src/main/java/ui/Ui.java b/src/main/java/ui/Ui.java index 4f535dcf2b..4efe4ef403 100644 --- a/src/main/java/ui/Ui.java +++ b/src/main/java/ui/Ui.java @@ -9,8 +9,8 @@ public class Ui { protected String nextCommand; public Ui() { + System.out.println("Hello! I'm Duke.\nWhat can I do for you?\n"); this.in = new Scanner(System.in); - this.nextCommand = in.nextLine(); } public void showWelcome() { @@ -22,7 +22,7 @@ public void showGoodbye() { } public String readCommand() { - return this.nextCommand; + return this.in.nextLine(); } public void changeCommand() { diff --git a/src/main/resources/images/DaDuke.png b/src/main/resources/images/DaDuke.png new file mode 100644 index 0000000000000000000000000000000000000000..91883d1f3dcfe0f2342ad8aebd3a6ff679117a71 GIT binary patch literal 16526 zcmd72byObN5;)kvhueokaCd?S4esvl5Al>1gqY8JQVrm?>#! zX?_g?0SgO@0Ed8qfPg{s0{aEc|7&>a2GHOjS0SmOAjkknGzcg(h^JnF;Mr9G>e*cg z;6DHj1%iQqgoS&SzWBHBKceR=1PB@u3g&4EK!Sn*Ai+@JXV!z@Zwmispcrp@@`O%1 z{I2Pv;(a>2xNkP zyBR8+dVvN2SjUrjdYM|gvz_=|ub%R{H|wRR&9n>e#`N3qOfHOG?3dT>y4W~Ahu)fZM}`VOnfL_9yAfHx-+_y(3IiO0-uoH4KRbQgLsT6P0;-gG#% z?{j)_C#ha;Q~Yh9IDH1%hx-i{8HOmgZ?5^nModD(bY=k)YCl2>XDn|#`folxya^18)Q03e;w zFpRT@%I?Rd?@K658kpbwp#y=w92Uuq<2jv6%hhQ$|I2~MZ_kyy`2I!k zzbpViKTvpuTkHELi~XJ3o6$e1KM+tE+uolXRQ}NS6P^!$(*HtUWb;;!{K?~s`r!AM z$URFyEdj7A)+GPdfgqZZ$@w?_=S6yPC0zX%1sa9ftwipon@AH0nl87#v?K^xjE=CV z`|Vl&WrS|+W_1562~bma*9r-z4GaOOu=%yg-o^8ZvemPhsL0qqNB=hhiCl_>S`AFj ztZ~@*0st&&uDm&CcR@?S7gbJH!M|&xrt*VmwccgF_PVUjyR=_lSq=1!Q{Mcs~R)K&yLrK7lr9}P|3yK zN#+D=9fE%w;Q4bdF>Y%8-u(47zYEkGf@d+D?upm!5Bx2<5_SB->D|$Raq+uLmiEBs5umV@Zl8d8lRne$rg-z6EJdv5Q->cX zN7}5neV@g@0T;>>5RvbypB?qD}0RORVJIm4DF?T`n1%UOxlK zH33w97VV^F?-)}~)_>9jNG`5SOl)u)Jo#%rUGaIPI!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b/src/main/resources/view/MainWindow.fxml new file mode 100644 index 0000000000..6c4613298f --- /dev/null +++ b/src/main/resources/view/MainWindow.fxml @@ -0,0 +1,19 @@ + + + + + + + + + + + +