diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000000..b07b8b8ed1
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,61 @@
+plugins {
+ id 'java'
+ id 'application'
+ id 'com.github.johnrengelman.shadow' version '5.1.0'
+ id 'org.openjfx.javafxplugin' version '0.0.7'
+ id 'checkstyle'
+}
+
+group 'seedu.duke'
+version '0.1.0'
+
+repositories {
+ mavenCentral()
+}
+
+checkstyle {
+ toolVersion = '8.23'
+}
+
+application {
+ // Change this to your main class.
+ mainClassName = "Launcher";
+}
+
+javafx {
+ version = "11.0.2"
+ modules = [ 'javafx.controls', 'javafx.fxml' ]
+}
+
+shadowJar {
+ archiveBaseName = "duke"
+ archiveVersion = "0.1.3"
+ archiveClassifier = null
+ archiveAppendix = null
+}
+
+dependencies {
+ testImplementation 'org.junit.jupiter:junit-jupiter:5.5.0'
+ String javaFxVersion = '11.0.1'
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
+}
+
+test {
+ useJUnitPlatform()
+}
+
+run {
+ enableAssertions = true
+}
+
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
new file mode 100644
index 0000000000..b1a57ba6c0
--- /dev/null
+++ b/config/checkstyle/checkstyle.xml
@@ -0,0 +1,257 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/Deadline_example.png b/docs/Deadline_example.png
new file mode 100644
index 0000000000..5891091c89
Binary files /dev/null and b/docs/Deadline_example.png differ
diff --git a/docs/Delete_example.png b/docs/Delete_example.png
new file mode 100644
index 0000000000..6bc0825a55
Binary files /dev/null and b/docs/Delete_example.png differ
diff --git a/docs/Done_example.png b/docs/Done_example.png
new file mode 100644
index 0000000000..bd53ae86d5
Binary files /dev/null and b/docs/Done_example.png differ
diff --git a/docs/Event_example.png b/docs/Event_example.png
new file mode 100644
index 0000000000..20c469db42
Binary files /dev/null and b/docs/Event_example.png differ
diff --git a/docs/PriorityList_example.png b/docs/PriorityList_example.png
new file mode 100644
index 0000000000..239b754c01
Binary files /dev/null and b/docs/PriorityList_example.png differ
diff --git a/docs/Priority_example.png b/docs/Priority_example.png
new file mode 100644
index 0000000000..04225edda6
Binary files /dev/null and b/docs/Priority_example.png differ
diff --git a/docs/README.md b/docs/README.md
index fd44069597..dd50c873ac 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -3,18 +3,133 @@
## Features
### Feature 1
-Description of feature.
+Displaying your list of tasks.
## Usage
-### `Keyword` - Describe action
+### `list` - Lists out your tasks.
-Describe action and its outcome.
+`list` is a command that helps to display the current list of tasks you have stored.
Example of usage:
-`keyword (optional arguments)`
+`list`
Expected outcome:
-`outcome`
+![Image of list usage](https://github.com/jerryk1997/duke/blob/master/docs/list_example.png)
+
+### Feature 2
+Adding a todo item.
+
+## Usage
+
+### `todo [description]` - Adds a todo item to your list of tasks. A todo item requires a non-empty description, but does not require a date.
+
+Example of usage:
+
+`todo read book`
+
+Expected outcome:
+
+![Image of adding todo](https://github.com/jerryk1997/duke/blob/master/docs/Todo_example.png)
+
+### Feature 3
+Adding an event.
+
+## Usage
+
+### `event [description /at DD/MM/YYYY HHMM]` - Adds an event to your list of tasks. An event is a task with a date at which it is happening.
+
+Example of usage:
+
+`event Project Meeting /at 02/10/2019 1530`
+
+Expected outcome:
+
+![Image of adding event](https://github.com/jerryk1997/duke/blob/master/docs/Event_example.png)
+
+### Feature 4
+Adding a deadline.
+
+## Usage
+
+### `deadline [description /by DD/MM/YYYY HHMM]` - Adds a deadline to your list of tasks. A deadline is a task which must be done by a certain date.
+
+Example of usage:
+
+`deadline Project submission /by 03/10/2019 1000`
+
+Expected outcome:
+
+![Image of adding deadline](https://github.com/jerryk1997/duke/blob/master/docs/Deadline_example.png)
+
+### Feature 5
+Doing a task.
+
+## Usage
+
+### `done [Index of task]` - Changes the status of the task at the given index to done. This results in the status icon changing from an X to a tick.
+
+Example of usage:
+
+`done 2`
+
+Expected outcome:
+
+![Image of doing a task](https://github.com/jerryk1997/duke/blob/master/docs/Done_example.png)
+
+### Feature 6
+Deleting a task.
+
+## Usage
+
+### `delete [Index of task]` - Removes the task at the given index from the list.
+
+Example of usage:
+
+`delete 2`
+
+Expected outcome:
+
+![Image of deleting a task](https://github.com/jerryk1997/duke/blob/master/docs/Delete_example.png)
+
+### Feature 7
+Assinging priority to the tasks.
+
+## Usage
+
+### `high todo [description]`
+### `medium event [description /at DD/MM/YYYY HHMM]`
+### `low deadline Project submission /by 03/10/2019 1000`
+
+Priority can be high/medium/low. Priority can be assigned to the task by typing 'high', 'medium', or 'low' before the task. If no priority is assigned, the priority of the task is assigned to low by default.
+
+Example of usage:
+
+`high todo return book`
+
+Expected outcome:
+
+![Image of assigning priority example](https://github.com/jerryk1997/duke/blob/master/docs/Priority_example.png)
+
+### Feature 8
+Shows the list of tasks sorted by priority.
+
+## Usage
+
+### `priority` - Lists out tasks by priority.
+
+Example of usage:
+
+`priority`
+
+Expecte outcome:
+
+![Image of priority list example](https://github.com/jerryk1997/duke/blob/master/docs/PriorityList_example.png)
+
+
+
+
+
+
diff --git a/docs/Todo_example.png b/docs/Todo_example.png
new file mode 100644
index 0000000000..c782113eb1
Binary files /dev/null and b/docs/Todo_example.png differ
diff --git a/docs/Ui.png b/docs/Ui.png
new file mode 100644
index 0000000000..35fbc5fef6
Binary files /dev/null and b/docs/Ui.png differ
diff --git a/docs/list_example.png b/docs/list_example.png
new file mode 100644
index 0000000000..f7409e6a46
Binary files /dev/null and b/docs/list_example.png differ
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..5c2d1cf016
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000000..59b5f89288
--- /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-5.6.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000000..83f2acfdc3
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,188 @@
+#!/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=$((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"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000000..24467a141f
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,100 @@
+@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 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/lib/apiguardian-api-1.0.0-javadoc.jar b/lib/apiguardian-api-1.0.0-javadoc.jar
new file mode 100644
index 0000000000..42d7d6aa64
Binary files /dev/null and b/lib/apiguardian-api-1.0.0-javadoc.jar differ
diff --git a/lib/apiguardian-api-1.0.0-sources.jar b/lib/apiguardian-api-1.0.0-sources.jar
new file mode 100644
index 0000000000..297363ec8a
Binary files /dev/null and b/lib/apiguardian-api-1.0.0-sources.jar differ
diff --git a/lib/apiguardian-api-1.0.0.jar b/lib/apiguardian-api-1.0.0.jar
new file mode 100644
index 0000000000..6cbff70f22
Binary files /dev/null and b/lib/apiguardian-api-1.0.0.jar differ
diff --git a/lib/junit-jupiter-5.4.2-javadoc.jar b/lib/junit-jupiter-5.4.2-javadoc.jar
new file mode 100644
index 0000000000..f31885d910
Binary files /dev/null and b/lib/junit-jupiter-5.4.2-javadoc.jar differ
diff --git a/lib/junit-jupiter-5.4.2-sources.jar b/lib/junit-jupiter-5.4.2-sources.jar
new file mode 100644
index 0000000000..f31885d910
Binary files /dev/null and b/lib/junit-jupiter-5.4.2-sources.jar differ
diff --git a/lib/junit-jupiter-5.4.2.jar b/lib/junit-jupiter-5.4.2.jar
new file mode 100644
index 0000000000..b3bf697621
Binary files /dev/null and b/lib/junit-jupiter-5.4.2.jar differ
diff --git a/lib/junit-jupiter-api-5.4.2-javadoc.jar b/lib/junit-jupiter-api-5.4.2-javadoc.jar
new file mode 100644
index 0000000000..ebb65fd422
Binary files /dev/null and b/lib/junit-jupiter-api-5.4.2-javadoc.jar differ
diff --git a/lib/junit-jupiter-api-5.4.2-sources.jar b/lib/junit-jupiter-api-5.4.2-sources.jar
new file mode 100644
index 0000000000..3cb82c7622
Binary files /dev/null and b/lib/junit-jupiter-api-5.4.2-sources.jar differ
diff --git a/lib/junit-jupiter-api-5.4.2.jar b/lib/junit-jupiter-api-5.4.2.jar
new file mode 100644
index 0000000000..40828b7a90
Binary files /dev/null and b/lib/junit-jupiter-api-5.4.2.jar differ
diff --git a/lib/junit-jupiter-engine-5.4.2-javadoc.jar b/lib/junit-jupiter-engine-5.4.2-javadoc.jar
new file mode 100644
index 0000000000..14955d409c
Binary files /dev/null and b/lib/junit-jupiter-engine-5.4.2-javadoc.jar differ
diff --git a/lib/junit-jupiter-engine-5.4.2-sources.jar b/lib/junit-jupiter-engine-5.4.2-sources.jar
new file mode 100644
index 0000000000..699c3fc176
Binary files /dev/null and b/lib/junit-jupiter-engine-5.4.2-sources.jar differ
diff --git a/lib/junit-jupiter-engine-5.4.2.jar b/lib/junit-jupiter-engine-5.4.2.jar
new file mode 100644
index 0000000000..3444a9806a
Binary files /dev/null and b/lib/junit-jupiter-engine-5.4.2.jar differ
diff --git a/lib/junit-jupiter-params-5.4.2-javadoc.jar b/lib/junit-jupiter-params-5.4.2-javadoc.jar
new file mode 100644
index 0000000000..0cfed785e4
Binary files /dev/null and b/lib/junit-jupiter-params-5.4.2-javadoc.jar differ
diff --git a/lib/junit-jupiter-params-5.4.2-sources.jar b/lib/junit-jupiter-params-5.4.2-sources.jar
new file mode 100644
index 0000000000..c654f4083e
Binary files /dev/null and b/lib/junit-jupiter-params-5.4.2-sources.jar differ
diff --git a/lib/junit-jupiter-params-5.4.2.jar b/lib/junit-jupiter-params-5.4.2.jar
new file mode 100644
index 0000000000..ee5650412e
Binary files /dev/null and b/lib/junit-jupiter-params-5.4.2.jar differ
diff --git a/lib/junit-platform-commons-1.4.2-javadoc.jar b/lib/junit-platform-commons-1.4.2-javadoc.jar
new file mode 100644
index 0000000000..a470d7ec0e
Binary files /dev/null and b/lib/junit-platform-commons-1.4.2-javadoc.jar differ
diff --git a/lib/junit-platform-commons-1.4.2-sources.jar b/lib/junit-platform-commons-1.4.2-sources.jar
new file mode 100644
index 0000000000..37e4b89b5b
Binary files /dev/null and b/lib/junit-platform-commons-1.4.2-sources.jar differ
diff --git a/lib/junit-platform-commons-1.4.2.jar b/lib/junit-platform-commons-1.4.2.jar
new file mode 100644
index 0000000000..270552518e
Binary files /dev/null and b/lib/junit-platform-commons-1.4.2.jar differ
diff --git a/lib/junit-platform-engine-1.4.2-javadoc.jar b/lib/junit-platform-engine-1.4.2-javadoc.jar
new file mode 100644
index 0000000000..3cab8e0553
Binary files /dev/null and b/lib/junit-platform-engine-1.4.2-javadoc.jar differ
diff --git a/lib/junit-platform-engine-1.4.2-sources.jar b/lib/junit-platform-engine-1.4.2-sources.jar
new file mode 100644
index 0000000000..2f487c5105
Binary files /dev/null and b/lib/junit-platform-engine-1.4.2-sources.jar differ
diff --git a/lib/junit-platform-engine-1.4.2.jar b/lib/junit-platform-engine-1.4.2.jar
new file mode 100644
index 0000000000..2c46ae92d3
Binary files /dev/null and b/lib/junit-platform-engine-1.4.2.jar differ
diff --git a/lib/opentest4j-1.1.1-javadoc.jar b/lib/opentest4j-1.1.1-javadoc.jar
new file mode 100644
index 0000000000..dadc6af164
Binary files /dev/null and b/lib/opentest4j-1.1.1-javadoc.jar differ
diff --git a/lib/opentest4j-1.1.1-sources.jar b/lib/opentest4j-1.1.1-sources.jar
new file mode 100644
index 0000000000..7cb1de75d0
Binary files /dev/null and b/lib/opentest4j-1.1.1-sources.jar differ
diff --git a/lib/opentest4j-1.1.1.jar b/lib/opentest4j-1.1.1.jar
new file mode 100644
index 0000000000..3f355292e0
Binary files /dev/null and b/lib/opentest4j-1.1.1.jar differ
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000000..d1e92fe5db
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'duke'
diff --git a/src/main/java/Deadline.class b/src/main/java/Deadline.class
new file mode 100644
index 0000000000..d6c42fba69
Binary files /dev/null and b/src/main/java/Deadline.class differ
diff --git a/src/main/java/Deadline.java b/src/main/java/Deadline.java
new file mode 100644
index 0000000000..65a2cbc19a
--- /dev/null
+++ b/src/main/java/Deadline.java
@@ -0,0 +1,95 @@
+import java.time.LocalDateTime;
+
+/**
+ * Deadline is a subclass of Task.
+ * Deadline represents a task with a description and a
+ * corresponding deadline.
+ */
+public class Deadline extends Task {
+ private String deadlineString;
+ private LocalDateTime deadlineDate;
+
+ /**
+ * Constructs a Deadline object.
+ * @param description Description of the task.
+ * @param deadline deadline of the task.
+ */
+ public Deadline(String description, String deadline, Priority priority) {
+ super(description, priority);
+
+ this.deadlineString = makeDeadline(deadline);
+ this.deadlineDate = storeAsDateTime(deadlineString);
+ }
+
+ /**
+ * Constructs a Deadline object.
+ * This constructor is for when the Deadline is being loaded
+ * from memory and hence can be already completed and the
+ * status of completion needs to be a parameter as well.
+ * @param description Description of the task
+ * @param deadline Date of the deadline
+ * @param status Status of completion
+ */
+ public Deadline(String description, String deadline, boolean status, Priority priority) {
+ super(description, priority);
+ this.deadlineString = makeDeadline(deadline);
+ this.deadlineDate = storeAsDateTime(deadlineString);
+ this.isDone = status;
+ }
+
+ /**
+ * Formats the String deadline.
+ * @param deadline Unformatted String deadline
+ * @return String Formatted String deadline
+ */
+ public String makeDeadline(String deadline) {
+ StringBuilder temp = new StringBuilder();
+ String[] deadlineArr = deadline.split(" ");
+
+ temp.append(deadlineArr[0]);
+ if (!deadlineArr[0].contains(":")) {
+ temp.append(":");
+ }
+
+ for (int i = 1; i < deadlineArr.length; i++) {
+ temp.append(" ");
+ temp.append(deadlineArr[i]);
+ }
+
+ return temp.toString();
+ }
+
+ /**
+ * Converting to a format to be stored on file.
+ * Task is converted to a string that is stored on the
+ * hard disk, and can be read easily when loaded so that
+ * the information can be loaded onto the Task List when the
+ * program first starts.
+ * @return String Formatted string to be stored.
+ */
+ @Override
+ public String toFileFormat() {
+ StringBuilder fileFormat = new StringBuilder();
+
+ fileFormat.append(taskPriority.toString() + "~");
+ fileFormat.append("D~");
+
+ if (this.isDone) {
+ fileFormat.append("1~");
+ } else {
+ fileFormat.append("0~");
+ }
+
+ fileFormat.append(this.description);
+ fileFormat.append("~");
+ fileFormat.append(this.deadlineString);
+
+ return fileFormat.toString();
+ }
+
+ @Override
+ public String toString() {
+ String task = "[D][" + this.getStatusIcon() + "] " + description + " (" + deadlineString + ")";
+ return task;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/DialogBox.java b/src/main/java/DialogBox.java
new file mode 100644
index 0000000000..d5ef980f8c
--- /dev/null
+++ b/src/main/java/DialogBox.java
@@ -0,0 +1,61 @@
+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;
+import javafx.scene.layout.Region;
+
+import java.io.IOException;
+import java.util.Collections;
+
+/**
+ * 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.setMinSize(Region.USE_COMPUTED_SIZE, Region.USE_COMPUTED_SIZE);
+ 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/Duke.class b/src/main/java/Duke.class
new file mode 100644
index 0000000000..026b0eb260
Binary files /dev/null and b/src/main/java/Duke.class differ
diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java
index 5d313334cc..2a78a5023d 100644
--- a/src/main/java/Duke.java
+++ b/src/main/java/Duke.java
@@ -1,10 +1,66 @@
+import java.io.IOException;
+
+/**
+ * Duke is the main body of the program. It takes in the
+ * user's input and processes it accordingly.
+ */
public class Duke {
- public static void main(String[] args) {
- String logo = " ____ _ \n"
- + "| _ \\ _ _| | _____ \n"
- + "| | | | | | | |/ / _ \\\n"
- + "| |_| | |_| | < __/\n"
- + "|____/ \\__,_|_|\\_\\___|\n";
- System.out.println("Hello from\n" + logo);
- }
-}
+
+ private Storage storage;
+ private TaskList tasks;
+ private Ui ui;
+ private boolean isExit = false;
+
+ public Duke() {
+
+ }
+
+ public Duke(String filePath) {
+ ui = new Ui();
+ storage = new Storage(filePath);
+ try {
+ tasks = new TaskList(storage.load());
+ tasks.updateQueue();
+ } catch (DukeException e) {
+ ui.showLoadingError();
+ tasks = new TaskList();
+ }
+ }
+
+ /**
+ * Processes the input from the user.
+ * Takes the input from the user, and processes it according to the command and description if
+ * necessary. The changes are updated in storage, and the response from the UI is returned as
+ * a string.
+ * @param input input from the user.
+ * @return String Response to be displayed to the user.
+ */
+ public String run(String input) {
+ Parser parser = new Parser(ui);
+
+ try {
+ String output = parser.parseCommand(input, tasks);
+ storage.update(tasks);
+
+ return output;
+
+ } catch (DukeException e) {
+
+ return ui.showException(e);
+
+ } catch (IOException e) {
+ return e.getMessage();
+ }
+ }
+
+
+ /**
+ * You should have your own function to generate a response to user input.
+ * Replace this stub with your completed method.
+ */
+ public String getResponse(String input) {
+ String output = run(input);
+ assert output != null;
+ return output;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/DukeException.class b/src/main/java/DukeException.class
new file mode 100644
index 0000000000..034e2f7d7a
Binary files /dev/null and b/src/main/java/DukeException.class differ
diff --git a/src/main/java/DukeException.java b/src/main/java/DukeException.java
new file mode 100644
index 0000000000..c478f149ef
--- /dev/null
+++ b/src/main/java/DukeException.java
@@ -0,0 +1,5 @@
+public class DukeException extends RuntimeException {
+ public DukeException(String message) {
+ super(message);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Event.class b/src/main/java/Event.class
new file mode 100644
index 0000000000..3416941954
Binary files /dev/null and b/src/main/java/Event.class differ
diff --git a/src/main/java/Event.java b/src/main/java/Event.java
new file mode 100644
index 0000000000..d5285a7fb7
--- /dev/null
+++ b/src/main/java/Event.java
@@ -0,0 +1,95 @@
+import java.time.LocalDateTime;
+
+/**
+ * Event is a subclass of Task.
+ * Event describes something that is happening
+ * at a certain time.
+ */
+public class Event extends Task {
+ private String eventDateString;
+ private LocalDateTime eventDate;
+
+ /**
+ * Constructs a Event object.
+ * @param description Description of the event.
+ * @param eventDate Date of the event.
+ */
+ public Event(String description, String eventDate, Priority priority) {
+ super(description, priority);
+ this.eventDateString = makeEventDate(eventDate);
+ this.eventDate = storeAsDateTime(eventDateString);
+ }
+
+ /**
+ * Constructs a Event object.
+ * This constructor is for when the Event is being loaded
+ * from memory and hence can be already completed and the
+ * status of completion needs to be a parameter as well.
+ * @param description Description of the task
+ * @param eventDate Date of the deadline
+ * @param status Status of completion
+ */
+ public Event(String description, String eventDate, boolean status, Priority priority) {
+ super(description, priority);
+ this.eventDateString = makeEventDate(eventDate);
+ this.eventDate = storeAsDateTime(eventDateString);
+ this.isDone = status;
+ }
+
+ /**
+ * Formats the String date.
+ * @param eventDate Unformatted String date
+ * @return String Formatted String date
+ */
+ public String makeEventDate(String eventDate) {
+ StringBuilder temp = new StringBuilder();
+ String[] eventDateArr = eventDate.split(" ");
+
+ temp.append(eventDateArr[0]);
+
+ if (!eventDateArr[0].contains(":")) {
+ temp.append(":");
+ }
+
+ for (int i = 1; i < eventDateArr.length; i++) {
+ temp.append(" ");
+ temp.append(eventDateArr[i]);
+ }
+
+ return temp.toString();
+ }
+
+ /**
+ * Converting to a format to be stored on file.
+ * Task is converted to a string that is stored on the
+ * hard disk, and can be read easily when loaded so that
+ * the information can be loaded onto the Task List when the
+ * program first starts.
+ * @return String Formatted string to be stored.
+ */
+ @Override
+ public String toFileFormat() {
+ StringBuilder fileFormat = new StringBuilder();
+
+ fileFormat.append(taskPriority.toString() + "~");
+ fileFormat.append("E~");
+
+ if (this.isDone) {
+ fileFormat.append("1~");
+ } else {
+ fileFormat.append("0~");
+ }
+
+ fileFormat.append(this.description);
+ fileFormat.append("~");
+ fileFormat.append(this.eventDateString);
+
+ return fileFormat.toString();
+ }
+
+ @Override
+ public String toString() {
+ String task = "[E][" + this.getStatusIcon() + "] " + this.description + " (" + eventDateString + ")";
+ return task;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/IncorrectInputException.class b/src/main/java/IncorrectInputException.class
new file mode 100644
index 0000000000..c2fc644ce8
Binary files /dev/null and b/src/main/java/IncorrectInputException.class differ
diff --git a/src/main/java/IncorrectInputException.java b/src/main/java/IncorrectInputException.java
new file mode 100644
index 0000000000..5e6d621be7
--- /dev/null
+++ b/src/main/java/IncorrectInputException.java
@@ -0,0 +1,5 @@
+public class IncorrectInputException extends DukeException {
+ public IncorrectInputException(String message) {
+ super(message);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Launcher.java b/src/main/java/Launcher.java
new file mode 100644
index 0000000000..11dbf00c62
--- /dev/null
+++ b/src/main/java/Launcher.java
@@ -0,0 +1,10 @@
+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/Main.java b/src/main/java/Main.java
new file mode 100644
index 0000000000..be3a44d0dc
--- /dev/null
+++ b/src/main/java/Main.java
@@ -0,0 +1,30 @@
+
+import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Scene;
+import javafx.scene.layout.AnchorPane;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+/**
+ * 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 {
+ FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("/view/MainWindow.fxml"));
+ AnchorPane ap = fxmlLoader.load();
+ Scene scene = new Scene(ap);
+ 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/MainWindow.java b/src/main/java/MainWindow.java
new file mode 100644
index 0000000000..21733be64d
--- /dev/null
+++ b/src/main/java/MainWindow.java
@@ -0,0 +1,53 @@
+import javafx.fxml.FXML;
+import javafx.scene.control.Button;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.control.TextField;
+import javafx.scene.image.Image;
+import javafx.scene.layout.AnchorPane;
+import javafx.scene.layout.VBox;
+/**
+ * Controller for MainWindow. Provides the layout for the other controls.
+ */
+
+public class MainWindow extends AnchorPane {
+ @FXML
+ private ScrollPane scrollPane;
+ @FXML
+ private VBox dialogContainer;
+ @FXML
+ private TextField userInput;
+ @FXML
+ private Button sendButton;
+
+ private Duke duke;
+
+ private 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().addAll(DialogBox.getUserDialog(Ui.showWelcome(), 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() throws InterruptedException {
+ 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/NoDescriptionException.class b/src/main/java/NoDescriptionException.class
new file mode 100644
index 0000000000..b0d3eb2100
Binary files /dev/null and b/src/main/java/NoDescriptionException.class differ
diff --git a/src/main/java/NoDescriptionException.java b/src/main/java/NoDescriptionException.java
new file mode 100644
index 0000000000..2051fd8a8c
--- /dev/null
+++ b/src/main/java/NoDescriptionException.java
@@ -0,0 +1,5 @@
+public class NoDescriptionException extends DukeException {
+ public NoDescriptionException(String message) {
+ super(message);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/NoExistingListException.class b/src/main/java/NoExistingListException.class
new file mode 100644
index 0000000000..d687436af1
Binary files /dev/null and b/src/main/java/NoExistingListException.class differ
diff --git a/src/main/java/NoExistingListException.java b/src/main/java/NoExistingListException.java
new file mode 100644
index 0000000000..57ac3ab427
--- /dev/null
+++ b/src/main/java/NoExistingListException.java
@@ -0,0 +1,5 @@
+public class NoExistingListException extends DukeException {
+ public NoExistingListException(String message) {
+ super(message);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Parser.class b/src/main/java/Parser.class
new file mode 100644
index 0000000000..3d714cc85c
Binary files /dev/null and b/src/main/java/Parser.class differ
diff --git a/src/main/java/Parser.java b/src/main/java/Parser.java
new file mode 100644
index 0000000000..6d5e282d8d
--- /dev/null
+++ b/src/main/java/Parser.java
@@ -0,0 +1,251 @@
+import java.util.Arrays;
+
+/**
+ * Parser is a class that aids in parsing through the user input
+ * and understanding the commands and executing them accordingly.
+ * Commands are passed into a method and appropriate actions are
+ * taken to create tasks, remove tasks, or add tasks etc.
+ */
+public class Parser {
+ private Ui ui;
+ private String taskType;
+ private String taskDesc;
+ private boolean isExit = false;
+ Priority taskPriority = Priority.LOW;
+
+ /**
+ * Constructs a Parser object.
+ * Parser object is constructed and passed a Ui object to
+ * help with printing the outputs back to the user.
+ * @param ui ui object for user interaction
+ */
+ public Parser(Ui ui) {
+ this.ui = ui;
+ }
+
+ /**
+ * Parses through the user's input and makes changes to the
+ * task list accordingly.
+ * First token of the string is checked to see if it is a valid
+ * instruction. If invalid an IncorrectInputException is thrown.
+ * If a task is given without description a NoDescriptionException
+ * is thrown. Otherwise the task is processed accordingly.
+ * @param input String input from the user.
+ * @param taskList The current list of tasks
+ * @throws DukeException Throws exception to handle incorrect user input
+ */
+ public String parseCommand(String input, TaskList taskList) throws DukeException {
+ assert input != null;
+ preProcessInput(input);
+
+ if (taskType.equals("bye")) {
+
+ isExit = true;
+ return ui.showGoodbye();
+
+ } else if (taskType.equals("list")) {
+
+ return ui.showTaskList(taskList);
+
+ } else if (taskType.equals("priority")) {
+
+ String output = ui.showPriorityTaskList(
+ taskList.getPriorityTaskList());
+ taskList.updateQueue();
+ return output;
+
+ } else if (taskDesc.isEmpty()) {
+
+ throw new NoDescriptionException(
+ ":( OOPS!!! The description of " + taskType + " cannot be empty.");
+
+ } else if (taskType.equals("done")) {
+
+ return doneCommand(taskDesc, taskList);
+
+ } else if (taskType.equals("delete")) {
+
+ return deleteCommand(taskDesc, taskList);
+
+ } else if (taskType.equals("find")) {
+
+ return ui.showFoundTasks(taskList.searchFor(taskDesc));
+
+ } else if (taskType.equals("todo")) {
+
+ return todoCommand(taskDesc, taskList);
+
+ } else if (taskType.equals("deadline")) {
+
+ return deadlineCommand(taskDesc, taskList);
+
+ } else if (taskType.equals("event")) {
+
+ return eventCommand(taskDesc, taskList);
+
+ } else {
+ assert false;
+ return "assert testing"; //Returning a string since method must return string
+ }
+ }
+
+ /**
+ * Processes the input to assign priority to the task if necessary.
+ * Parses through the string and checks if priority is assigned. If priority
+ * is not assigned, it is set to low by default
+ * @param input Input string from teh user
+ * @throws DukeException To check if input is correct
+ */
+ private void preProcessInput(String input) throws DukeException {
+ String[] inputArr = input.split(" ");
+
+ if (inputArr[0].equals("high")) {
+ taskPriority = Priority.HIGH;
+ inputArr = Arrays.copyOfRange(inputArr,1, inputArr.length);
+ } else if (inputArr[0].equals("medium")) {
+ taskPriority = Priority.MEDIUM;
+ inputArr = Arrays.copyOfRange(inputArr,1, inputArr.length);
+ } else if (inputArr[0].equals("low")) {
+ inputArr = Arrays.copyOfRange(inputArr,1, inputArr.length);
+ } else {}
+
+ //Extracting task type and description from input
+ taskType = inputArr[0];
+ taskDesc = getDesc(inputArr);
+
+ if (!correctInput(taskType)) {
+ throw new IncorrectInputException(
+ ":( OOPS!!! I'm sorry, but I don't know what that means :-(");
+ }
+ }
+
+ /**
+ * Performs actions to do a task.
+ * Takes in the index of a task, and extracts it from the task list. Checks if
+ * the task is done. If the task is not done the Task#doTask is called to change
+ * the necessary attributes of the task, and the output from the UI is returned.
+ * @param taskDesc String of the index of the task
+ * @param taskList List of the tasks
+ * @return String String output from the UI
+ */
+ private String doneCommand(String taskDesc, TaskList taskList) {
+ int taskNum = Integer.parseInt(taskDesc);
+ Task task = taskList.getTask(taskNum);
+
+ if (task.isDone()) {
+ return ui.showTaskAlreadyDone(task);
+ } else {
+ task.doTask();
+ return ui.showTaskDone(task);
+ }
+ }
+
+ /**
+ * Performs actions to delete a task.
+ * Takes in the index of a task, and extracts it from the task list. Task#deleteTask
+ * is called to delete the task. Output from teh UI is returned.
+ * @param taskDesc String of the index of the task
+ * @param taskList List of the tasks
+ * @return String String output from the UI
+ */
+ private String deleteCommand(String taskDesc, TaskList taskList) {
+ int taskNum = Integer.parseInt(taskDesc);
+ Task task = taskList.getTask(taskNum);
+ taskList.deleteTask(taskNum);
+
+ return ui.showTaskDeleted(task, taskList);
+ }
+
+ /**
+ * Adds a To do task to the task list.
+ * Takes in the description of the to do task, and task list. Creates a to do task
+ * object, and adds it to the task list. Returns the output from the UI.
+ * @param taskDesc Description of task
+ * @param taskList List of tasks
+ * @return String String output from the UI
+ */
+ private String todoCommand(String taskDesc, TaskList taskList) {
+ Task newTodo = new Todo(taskDesc, taskPriority);
+ taskList.addTask(newTodo);
+
+ return ui.showTaskAdded(newTodo, taskList);
+ }
+
+ /**
+ * Adds a deadline task to the task list.
+ * Takes in the description of the deadline task, and task list. Creates a deadline task
+ * object, and adds it to the task list. Returns the output from the UI.
+ * @param taskDesc Description of task
+ * @param taskList List of tasks
+ * @return String String output from the UI
+ */
+ private String deadlineCommand(String taskDesc, TaskList taskList) {
+ String[] taskDescArr = taskDesc.split(" /");
+
+ Task newDeadline = new Deadline(taskDescArr[0], taskDescArr[1], taskPriority);
+
+ taskList.addTask(newDeadline);
+
+ return ui.showTaskAdded(newDeadline, taskList);
+ }
+
+ /**
+ * Adds a event task to the task list.
+ * Takes in the description of the event task, and task list. Creates a event task
+ * object, and adds it to the task list. Returns the output from the UI.
+ * @param taskDesc Description of task
+ * @param taskList List of tasks
+ * @return String String output from the UI
+ */
+ private String eventCommand(String taskDesc, TaskList taskList) {
+ String[] taskDescArr = taskDesc.split(" /");
+
+ Task newEvent = new Event(taskDescArr[0], taskDescArr[1], taskPriority);
+
+ taskList.addTask(newEvent);
+
+ return ui.showTaskAdded(newEvent, taskList);
+ }
+
+ /**
+ * Extracts the description and date of the task
+ * leaving the command out.
+ * @param inputArr String[] of the whole input by the user
+ * @return String String representing the description and date.
+ */
+ public static String getDesc(String[] inputArr) {
+ StringBuilder builder = new StringBuilder();
+
+ for (int i = 1; i < inputArr.length; i++) {
+ if (i != inputArr.length - 1) {
+ builder.append(inputArr[i]);
+ builder.append(" ");
+ } else {
+ builder.append(inputArr[i]);
+ }
+ }
+
+ return builder.toString();
+ }
+
+ public boolean isExit() {
+ return isExit;
+ }
+
+ /**
+ * Checks if the command is correct.
+ * @param input Command
+ * @return boolean Whether input is correct
+ */
+ public static boolean correctInput(String input) {
+ return input.equals("todo")
+ || input.equals("event")
+ || input.equals("deadline")
+ || input.equals("list")
+ || input.equals("done")
+ || input.equals("bye")
+ || input.equals("delete")
+ || input.equals("find")
+ || input.equals("priority");
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Priority.java b/src/main/java/Priority.java
new file mode 100644
index 0000000000..b83d718c01
--- /dev/null
+++ b/src/main/java/Priority.java
@@ -0,0 +1,3 @@
+enum Priority {
+ HIGH, MEDIUM, LOW;
+}
\ No newline at end of file
diff --git a/src/main/java/Storage.class b/src/main/java/Storage.class
new file mode 100644
index 0000000000..360a78eccc
Binary files /dev/null and b/src/main/java/Storage.class differ
diff --git a/src/main/java/Storage.java b/src/main/java/Storage.java
new file mode 100644
index 0000000000..a0355b75f1
--- /dev/null
+++ b/src/main/java/Storage.java
@@ -0,0 +1,132 @@
+import java.io.File;
+import java.io.FileWriter;
+
+import java.util.ListIterator;
+import java.util.LinkedList;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import java.util.Scanner;
+
+/**
+ * Storage is a class that handles operations to store user input
+ * of the tasks and write it onto the computer's memory so that it is
+ * preserved after the application terminates.
+ */
+public class Storage {
+ File taskListFile;
+
+ /**
+ * Constructs a Storage object.
+ * Takes in a file path so that it can be used later
+ * to direct where to store the information.
+ * @param filePath File path to the storage location
+ */
+ public Storage(String filePath) {
+ taskListFile = new File(filePath);
+ }
+
+ /**
+ * Generates a LinkedList of tasks based on what the user has
+ * saved from the last use of this program.
+ * The tasks are stored in a pre determined format. All this
+ * method does is read the tasks line by line and create new
+ * Task objects based on the strings and adds them to a
+ * LinkedList to be returned.
+ * @return LinkedList List representing the tasks saved
+ * @throws DukeException Exception thrown if no existing list is found
+ */
+ public LinkedList load() throws DukeException {
+ try {
+ System.out.println("loaded");
+ if (!taskListFile.exists()) {
+ throw new NoExistingListException("No saved List found.");
+ }
+
+ Scanner sc = new Scanner(taskListFile);
+ LinkedList taskList = new LinkedList<>();
+
+
+ while (sc.hasNext()) {
+ String nextTask = sc.nextLine();
+
+ String[] nextTaskArr = nextTask.split("~");
+ boolean status = nextTaskArr[2].equals("1");
+ Priority taskPriority = getPriority(nextTaskArr[0]);
+
+ switch (nextTaskArr[1]) {
+ case "T":
+ taskList.add(
+ new Todo(nextTaskArr[3], status, taskPriority));
+ break;
+ case "D":
+ taskList.add(
+ new Deadline(nextTaskArr[3], nextTaskArr[4], status, taskPriority));
+ break;
+ case "E":
+ taskList.add(
+ new Event(nextTaskArr[3], nextTaskArr[4], status, taskPriority));
+ break;
+ default:
+ assert false;
+ }
+ }
+
+ return taskList;
+ } catch (FileNotFoundException e) {
+ System.out.println(e.getMessage());
+ return new LinkedList();
+ }
+ }
+
+ /**
+ * Gets the priority of the task.
+ * @param priorityString String representation of priority
+ * @return Priority Priority of the task
+ */
+ private Priority getPriority(String priorityString) {
+ if (priorityString.equals("HIGH")) {
+ return Priority.HIGH;
+ } else if (priorityString.equals("MEDIUM")) {
+ return Priority.MEDIUM;
+ } else if (priorityString.equals("LOW")) {
+ return Priority.LOW;
+ } else {
+ assert false;
+ return Priority.MEDIUM;
+ }
+ }
+
+ /**
+ * Updates the file that saves the tasks based on the
+ * LinkedList of tasks stored in the TaskList file.
+ * The method takes in a TaskList object, extracts the Linked
+ * List stored and goes through every task stored, converting
+ * them into strings and appending the string to a stringbuilder
+ * before converting the stringbuilder into a string to be written
+ * onto the file storing the information. Every change is not an
+ * addition but rather the whole file is overwritten again.
+ * @param taskList TaskList object representing the current list of tasks
+ * @throws IOException Throws an IOException
+ */
+ public void update(TaskList taskList) throws IOException {
+ FileWriter fw = new FileWriter(taskListFile);
+ StringBuilder sb = new StringBuilder();
+ LinkedList list = taskList.getList();
+
+ ListIterator iter = list.listIterator();
+
+
+ while (iter.hasNext()) {
+ Task current = iter.next();
+ sb.append(current.toFileFormat());
+ sb.append("\n");
+ }
+
+ String taskListString = sb.toString();
+
+ fw.write(taskListString);
+ fw.close();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Task.class b/src/main/java/Task.class
new file mode 100644
index 0000000000..b5ca88fc51
Binary files /dev/null and b/src/main/java/Task.class differ
diff --git a/src/main/java/Task.java b/src/main/java/Task.java
new file mode 100644
index 0000000000..b815181643
--- /dev/null
+++ b/src/main/java/Task.java
@@ -0,0 +1,143 @@
+import java.time.LocalDateTime;
+
+/**
+ * Task is an object simulating a task, eg events.
+ * This class contains attributes that every task should have
+ * such as whether the task is done or what the description of
+ * the task is. This class also has methods that can change
+ * the attributes of the task, which are common among all
+ * tasks such as doing the task and storing the deadlines
+ * of the task as a Java date.
+ */
+public class Task implements Comparable {
+ protected String description;
+ protected boolean isDone;
+ protected Priority taskPriority;
+
+ /**
+ * Constructs a Task object.
+ * A task generally constructed with a description what to do.
+ * @param description Description of what the task is about.
+ */
+ public Task(String description, Priority taskPriority) {
+ this.description = description;
+ this.isDone = false;
+ this.taskPriority = taskPriority;
+ }
+
+ /**
+ * Generates the status icon of the task.
+ * Method returns either a tick or a cross icon based
+ * on whether the task is done. Uses unicode.
+ * @return String representing the unicode of the icon.
+ */
+ protected String getStatusIcon() {
+ if (isDone) {
+ return "\u2713";
+ } else {
+ return "\u2718";
+ }
+ }
+
+ public boolean isDone() {
+ return this.isDone;
+ }
+
+ /**
+ * Changes the value of boolean isDone to True.
+ */
+ public void doTask() {
+ this.isDone = true;
+ }
+
+ /**
+ * Converts a String to a LocalDateTime object.
+ * This method converts a string of the format "dd/mm/yyyy HHMM"
+ * into a LocalDateTime object. e.g. "2/12/2019 1800"
+ * @param date String of the format given above.
+ * @return LocalDateTime LocalDateTime object representing the date.
+ */
+ protected LocalDateTime storeAsDateTime(String date) {
+ StringBuilder sb = new StringBuilder();
+ String[] temp = date.split(" ");
+
+
+ int timeInt = Integer.parseInt(temp[2]);
+ String hour = (timeInt / 100) + "";
+ String minutes = (timeInt % 100) + "";
+
+ String dateString = temp[1];
+ String[] dateStringArr = dateString.split("/");
+
+ //If day of the week is single digit pad with 0
+ if (dateStringArr[0].length() == 1) {
+ dateStringArr[0] = "0" + dateStringArr[0];
+ }
+
+ //If month is single digit pad with 0
+ if (dateStringArr[1].length() == 1) {
+ dateStringArr[1] = "0" + dateStringArr[1];
+ }
+
+ //Formatting for LocalDateTime to parse
+ sb.append(dateStringArr[2]);
+ sb.append("-");
+ sb.append(dateStringArr[1]);
+ sb.append("-");
+ sb.append(dateStringArr[0]);
+ sb.append("T");
+
+ if (hour.length() == 1) {
+ hour = "0" + hour;
+ }
+
+ if (minutes.length() == 1) {
+ minutes = "0" + minutes;
+ }
+
+ sb.append(hour + ":" + minutes + ":00");
+
+ return LocalDateTime.parse(sb.toString());
+ }
+
+ public String getDesc() {
+ return this.description;
+ }
+
+ public Priority getPriority() {
+ return taskPriority;
+ }
+
+ /**
+ * Filler method to imitate an interface.
+ * @return String empty string
+ */
+ protected String toFileFormat() {
+ return "";
+ }
+
+ @Override
+ public String toString() {
+ String task = "[" + this.getStatusIcon() + "] " + description;
+ return task;
+ }
+
+ @Override
+ public int compareTo(Task task) {
+ if (this.taskPriority == task.taskPriority) {
+ return 0;
+ } else if (this.taskPriority == Priority.HIGH) {
+ return -1;
+ } else if (this.taskPriority == Priority.LOW) {
+ return 1;
+ } else if (task.taskPriority == Priority.HIGH) {
+ return 1;
+ } else if (task.taskPriority == Priority.LOW) {
+ return -1;
+ } else {
+ assert false;
+ return 0;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/TaskList.class b/src/main/java/TaskList.class
new file mode 100644
index 0000000000..dc7e0d7c8c
Binary files /dev/null and b/src/main/java/TaskList.class differ
diff --git a/src/main/java/TaskList.java b/src/main/java/TaskList.java
new file mode 100644
index 0000000000..0f65723314
--- /dev/null
+++ b/src/main/java/TaskList.java
@@ -0,0 +1,102 @@
+import java.util.LinkedList;
+import java.util.ListIterator;
+import java.util.PriorityQueue;
+
+/**
+ * TaskList represents a list of tasks.
+ * The class supports the storing of the tasks, and
+ * operations that can change or interact with this list of tasks.
+ */
+public class TaskList {
+ private LinkedList taskList;
+ private PriorityQueue priorityTaskList;
+
+ /**
+ * Constructs a TaskList object.
+ * Initializes the LinkedList of tasks.
+ */
+ public TaskList() {
+ taskList = new LinkedList();
+ priorityTaskList = new PriorityQueue();
+ }
+
+ /**
+ * Constructs a TaskList object.
+ * Passes an existing list of tasks to be
+ * stored in this TaskList object.
+ * @param taskList Linked List of task
+ */
+ public TaskList(LinkedList taskList) {
+ this.taskList = taskList;
+ }
+
+ public void deleteTask(int taskNum) {
+ assert !(taskNum < 0) : "Negative task number";
+ taskList.remove(taskNum - 1);
+ updateQueue();
+ }
+
+ public void addTask(Task task) {
+ assert task != null;
+ taskList.add(task);
+ updateQueue();
+ }
+
+ public LinkedList getList() {
+ return taskList;
+ }
+
+ public Task getTask(int taskNum) {
+ assert !(taskNum < 0) : "Negative task number";
+ return taskList.get(taskNum - 1);
+ }
+
+ public PriorityQueue getPriorityTaskList() {
+ return priorityTaskList;
+ }
+
+ public int size() {
+ return taskList.size();
+ }
+
+ public boolean isEmpty() {
+ return taskList.isEmpty();
+ }
+
+ /**
+ * Searches for the target String in every task's description.
+ * Loops through the list of tasks tries to match the target String
+ * a substring in the task description.
+ * @param target Target string to search for
+ * @return LinkedList of matching tasks
+ */
+ public LinkedList searchFor(String target) {
+ ListIterator iter = taskList.listIterator();
+ LinkedList tasksFound = new LinkedList<>();
+ Task current;
+
+ while (iter.hasNext()) {
+ current = iter.next();
+ String description = current.getDesc();
+
+ if (description.contains(target)) {
+ tasksFound.add(current);
+ }
+ }
+
+ return tasksFound;
+
+ }
+
+ public void updateQueue() {
+ int numOfTask = taskList.size();
+ PriorityQueue updatedQueue = new PriorityQueue<>();
+
+ for (int i = 0; i < numOfTask; i++) {
+ Task current = taskList.get(i);
+ updatedQueue.add(current);
+ }
+
+ priorityTaskList = updatedQueue;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Todo.class b/src/main/java/Todo.class
new file mode 100644
index 0000000000..6b80231030
Binary files /dev/null and b/src/main/java/Todo.class differ
diff --git a/src/main/java/Todo.java b/src/main/java/Todo.java
new file mode 100644
index 0000000000..213b2bc43d
--- /dev/null
+++ b/src/main/java/Todo.java
@@ -0,0 +1,59 @@
+/**
+ * Todo is a subclass of a Task.
+ * Todo represents a task with no deadline, and only
+ * contains a decription of what is to be done.
+ */
+public class Todo extends Task {
+ /**
+ * Constructs a Todo object.
+ * @param description Description of the task.
+ */
+ public Todo(String description, Priority priority) {
+ super(description, priority);
+ }
+
+ /**
+ * Constructs a Todo object.
+ * This constructor is for when it is being loaded from memory
+ * and may have already been completed, so its isDone status must
+ * be updated accordingly.
+ * @param description Description of the task
+ * @param status Status of completion
+ */
+ public Todo(String description, boolean status, Priority priority) {
+ super(description, priority);
+ this.isDone = status;
+ }
+
+ /**
+ * Converting to a format to be stored on file.
+ * Task is converted to a string that is stored on the
+ * hard disk, and can be read easily when loaded so that
+ * the information can be loaded onto the Task List when the
+ * program first starts.
+ * @return String Formatted string to be stored.
+ */
+ @Override
+ public String toFileFormat() {
+ StringBuilder fileFormat = new StringBuilder();
+
+ fileFormat.append(taskPriority.toString() + "~");
+ fileFormat.append("T~");
+
+ if (this.isDone) {
+ fileFormat.append("1~");
+ } else {
+ fileFormat.append("0~");
+ }
+
+ fileFormat.append(this.description);
+
+ return fileFormat.toString();
+ }
+
+ @Override
+ public String toString() {
+ String task = "[T][" + this.getStatusIcon() + "] " + description;
+ return task;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Ui.class b/src/main/java/Ui.class
new file mode 100644
index 0000000000..ab08a933a1
Binary files /dev/null and b/src/main/java/Ui.class differ
diff --git a/src/main/java/Ui.java b/src/main/java/Ui.java
new file mode 100644
index 0000000000..055a7b2ff3
--- /dev/null
+++ b/src/main/java/Ui.java
@@ -0,0 +1,187 @@
+import java.util.LinkedList;
+import java.util.ListIterator;
+import java.util.PriorityQueue;
+
+/**
+ * Ui is a class that designed to output the how the program
+ * responds to the user inputs.
+ */
+public class Ui {
+ public static String showWelcome() {
+ String welcomeMessage = line()
+ + indent() + "Hello! I'm Duke\n"
+ + indent() + "What can I do for you?\n"
+ + line();
+ return welcomeMessage;
+ }
+
+ public static String showGoodbye() {
+ String exitMessage = line()
+ + indent() + "Bye. Hope to see you again soon\n"
+ + line();
+ return exitMessage;
+ }
+
+ public static String indent() {
+ return " ";
+ }
+
+ public static String line() {
+ StringBuilder line = new StringBuilder();
+ line.append(indent());
+
+ for (int i = 0; i < 47; i++) {
+ line.append("_");
+ }
+
+ line.append("\n");
+
+ String stringLine = line.toString();
+
+ return stringLine;
+ }
+
+ public String showTaskList(TaskList taskList) {
+ if (taskList.isEmpty()) {
+
+ String output = line()
+ + indent() + "There are no tasks in the list currently.\n"
+ + line();
+
+ return output;
+
+ } else {
+ StringBuilder output = new StringBuilder();
+ LinkedList taskLinkedList = taskList.getList();
+ ListIterator iter = taskLinkedList.listIterator();
+
+ int count = 1;
+
+ output.append(line());
+
+ output.append(indent() + "Here are the tasks in your list:\n");
+
+ while (iter.hasNext()) {
+ String currentTask = iter.next().toString();
+ output.append(indent() + count + "." + currentTask + "\n");
+ count++;
+ }
+
+ output.append(line());
+ return output.toString();
+ }
+ }
+
+ public String showTaskDone(Task task) {
+ String output = line()
+ + indent() + "Nice! I've marked this task as done:\n"
+ + indent() + " " + task.toString() + "\n"
+ + line();
+ return output;
+ }
+
+ public String showTaskAlreadyDone(Task task) {
+ String output = line()
+ + indent() + "This task has already been done.\n"
+ + indent() + " " + task.toString() + "\n"
+ + line();
+ return output;
+ }
+
+ public String showTaskAdded(Task task, TaskList taskList) {
+ StringBuilder output = new StringBuilder();
+ output.append(line());
+ output.append(indent() + "Got it. I've added this task:\n");
+ output.append(indent() + " " + task.toString() + "\n");
+ output.append(indent());
+
+ if (taskList.size() == 1) {
+ output.append("Now you have 1 task in the list.\n");
+ } else {
+ output.append("Now you have " + taskList.size() + " tasks in the list.\n");
+ }
+
+ output.append(line());
+ return output.toString();
+ }
+
+ public String showTaskDeleted(Task task, TaskList taskList) {
+ StringBuilder output = new StringBuilder();
+ output.append(line());
+ output.append(indent() + "Noted. I've removed this task:\n");
+ output.append(indent() + " " + task.toString() + "\n");
+ output.append(indent());
+
+ if (taskList.size() == 1) {
+ output.append("Now you have 1 task in your list.\n");
+ } else if (taskList.isEmpty()) {
+ output.append("Now you have no tasks in your list.\n");
+ } else {
+ output.append("Now you have " + (taskList.size()) + " tasks in your list.\n");
+ }
+
+ output.append(line());
+ return output.toString();
+ }
+
+ /**
+ * Prints the list of tasks which has descriptions
+ * matching that of a target String.
+ * @param taskList List of matching tasks
+ */
+ public String showFoundTasks(LinkedList taskList) {
+ StringBuilder output = new StringBuilder();
+ ListIterator iter = taskList.listIterator();
+ Task current;
+ int count = 1;
+
+ output.append(line());
+
+ if (taskList.isEmpty()) {
+ output.append(indent() + "There are no matching tasks in your list.\n");
+ } else {
+ output.append(indent() + "Here are the matching tasks in your list:\n");
+ }
+
+ while (iter.hasNext()) {
+ current = iter.next();
+ output.append(indent() + count + "." + current.toString() + "\n");
+ }
+
+ output.append(line());
+ return output.toString();
+ }
+
+ public String showPriorityTaskList(PriorityQueue priorityTaskList) {
+ StringBuilder output = new StringBuilder();
+
+ output.append(line());
+ output.append(indent() + "Here is the list of your tasks prioritised.\n");
+
+ while (!priorityTaskList.isEmpty()) {
+ Task currentTask = priorityTaskList.poll();
+ String taskPriority = currentTask.getPriority().toString();
+ output.append(indent() + taskPriority + " " + currentTask.toString() + "\n");
+ }
+
+ output.append(line());
+
+ return output.toString();
+ }
+
+ public String showException(DukeException e) {
+ String output = line()
+ + indent() + e.getMessage() + "\n"
+ + line();
+
+ return output;
+ }
+
+ public String showLoadingError() {
+ String output = line()
+ + indent() + "You do not have a saved task list.\n"
+ + line();
+
+ return output;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/text-ui-testing/META-INF/MANIFEST.MF b/src/main/java/text-ui-testing/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..d2ffd5b4d2
--- /dev/null
+++ b/src/main/java/text-ui-testing/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: Duke
+
diff --git a/src/main/java/text-ui-testing/runtest.sh b/src/main/java/text-ui-testing/runtest.sh
new file mode 100644
index 0000000000..9f7635a5af
--- /dev/null
+++ b/src/main/java/text-ui-testing/runtest.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+# create bin directory if it doesn't exist
+if [ ! -d "../bin" ]
+then
+ mkdir ../bin
+fi
+
+# delete output from previous run
+if [ -e "./ACTUAL.TXT" ]
+then
+ rm ACTUAL.TXT
+fi
+
+# compile the code into the bin folder, terminates if error occurred
+if ! javac -cp /Users/jerry/duke/src -Xlint:none -d ../bin /Users/jerry/duke/src/main/java/Duke.java
+
+then
+ echo "********** BUILD FAILURE **********"
+ exit 1
+fi
+
+# run the program, feed commands from input.txt file and redirect the output to the ACTUAL.TXT
+java -classpath ../bin Duke < input.txt > ACTUAL.TXT
+
+# compare the output to the expected output
+diff ACTUAL.TXT EXPECTED.TXT
+if [ $? -eq 0 ]
+then
+ echo "Test result: PASSED"
+ exit 0
+else
+ echo "Test result: FAILED"
+ exit 1
+fi
\ No newline at end of file
diff --git a/src/main/resources/images/DaDuke.png b/src/main/resources/images/DaDuke.png
new file mode 100644
index 0000000000..d893658717
Binary files /dev/null and b/src/main/resources/images/DaDuke.png differ
diff --git a/src/main/resources/images/DaUser.png b/src/main/resources/images/DaUser.png
new file mode 100644
index 0000000000..3c82f45461
Binary files /dev/null and b/src/main/resources/images/DaUser.png differ
diff --git a/src/main/resources/view/DialogBox.fxml b/src/main/resources/view/DialogBox.fxml
new file mode 100644
index 0000000000..69a6f6b62c
--- /dev/null
+++ b/src/main/resources/view/DialogBox.fxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml
new file mode 100644
index 0000000000..bfbbece83e
--- /dev/null
+++ b/src/main/resources/view/MainWindow.fxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/test/java/DeadlineTest.java b/src/test/java/DeadlineTest.java
new file mode 100644
index 0000000000..cfa068f32b
--- /dev/null
+++ b/src/test/java/DeadlineTest.java
@@ -0,0 +1,11 @@
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class DeadlineTest {
+ @Test
+ public void makeDeadlineTest(){
+ assertEquals("by: 2/12/2019 1800",
+ new Deadline("submissions", "by 2/12/2019 1800").makeDeadline("by 2/12/2019 1800"));
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/DukeTest.java b/src/test/java/DukeTest.java
new file mode 100644
index 0000000000..8a14575adc
--- /dev/null
+++ b/src/test/java/DukeTest.java
@@ -0,0 +1,10 @@
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+public class DukeTest {
+ @Test
+ public void dummyTest(){
+ assertEquals(2, 2);
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/ParserTest.java b/src/test/java/ParserTest.java
new file mode 100644
index 0000000000..2981257dc2
--- /dev/null
+++ b/src/test/java/ParserTest.java
@@ -0,0 +1,17 @@
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+public class ParserTest {
+ @Test
+ public void correctInputTest(){
+ Assertions.assertEquals(true, Parser.correctInput("bye"));
+ }
+
+ @Test
+ public void getDescTest() {
+ String event = ("event project meeting /at 2/12/2019 1800");
+ String[] eventArr = event.split(" ");
+
+ Assertions.assertEquals("project meeting /at 2/12/2019 1800", Parser.getDesc(eventArr));
+ }
+}
\ No newline at end of file
diff --git a/tasks.txt b/tasks.txt
new file mode 100644
index 0000000000..f865d5551d
--- /dev/null
+++ b/tasks.txt
@@ -0,0 +1,3 @@
+LOW~T~0~read book
+LOW~E~1~Project Meeting~at: 02/10/2019 1530
+LOW~D~0~Project submission~by: 03/10/2019 1000