diff --git a/.gitignore b/.gitignore
index f69985ef1f..c5310871a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,17 +1,6 @@
-# IDEA files
-/.idea/
-/out/
-/*.iml
-# Gradle build files
-/.gradle/
-/build/
-src/main/resources/docs/
-
-# MacOS custom attributes files created by Finder
-.DS_Store
-*.iml
-bin/
-
-/text-ui-test/ACTUAL.txt
-text-ui-test/EXPECTED-UNIX.TXT
+.gradle/6.7/executionHistory/executionHistory.lock
+.gradle/6.7/fileHashes/fileHashes.lock
+.gradle/buildOutputCleanup/buildOutputCleanup.lock
+.gradle/checksums/checksums.lock
+*.lock
diff --git a/.gradle/6.7/executionHistory/executionHistory.bin b/.gradle/6.7/executionHistory/executionHistory.bin
new file mode 100644
index 0000000000..3f3337da12
Binary files /dev/null and b/.gradle/6.7/executionHistory/executionHistory.bin differ
diff --git a/.gradle/6.7/executionHistory/executionHistory.lock b/.gradle/6.7/executionHistory/executionHistory.lock
new file mode 100644
index 0000000000..9d27397df8
Binary files /dev/null and b/.gradle/6.7/executionHistory/executionHistory.lock differ
diff --git a/.gradle/6.7/fileChanges/last-build.bin b/.gradle/6.7/fileChanges/last-build.bin
new file mode 100644
index 0000000000..f76dd238ad
Binary files /dev/null and b/.gradle/6.7/fileChanges/last-build.bin differ
diff --git a/.gradle/6.7/fileHashes/fileHashes.bin b/.gradle/6.7/fileHashes/fileHashes.bin
new file mode 100644
index 0000000000..836bf7c31e
Binary files /dev/null and b/.gradle/6.7/fileHashes/fileHashes.bin differ
diff --git a/.gradle/6.7/fileHashes/fileHashes.lock b/.gradle/6.7/fileHashes/fileHashes.lock
new file mode 100644
index 0000000000..8f10fd4862
Binary files /dev/null and b/.gradle/6.7/fileHashes/fileHashes.lock differ
diff --git a/.gradle/6.7/gc.properties b/.gradle/6.7/gc.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/.gradle/6.7/javaCompile/classAnalysis.bin b/.gradle/6.7/javaCompile/classAnalysis.bin
new file mode 100644
index 0000000000..c5d529efef
Binary files /dev/null and b/.gradle/6.7/javaCompile/classAnalysis.bin differ
diff --git a/.gradle/6.7/javaCompile/javaCompile.lock b/.gradle/6.7/javaCompile/javaCompile.lock
new file mode 100644
index 0000000000..a72aaafa2d
Binary files /dev/null and b/.gradle/6.7/javaCompile/javaCompile.lock differ
diff --git a/.gradle/6.7/javaCompile/taskHistory.bin b/.gradle/6.7/javaCompile/taskHistory.bin
new file mode 100644
index 0000000000..35bba9e77a
Binary files /dev/null and b/.gradle/6.7/javaCompile/taskHistory.bin differ
diff --git a/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock
new file mode 100644
index 0000000000..637ba72dcf
Binary files /dev/null and b/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock differ
diff --git a/.gradle/7.1/dependencies-accessors/gc.properties b/.gradle/7.1/dependencies-accessors/gc.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/.gradle/7.1/fileChanges/last-build.bin b/.gradle/7.1/fileChanges/last-build.bin
new file mode 100644
index 0000000000..f76dd238ad
Binary files /dev/null and b/.gradle/7.1/fileChanges/last-build.bin differ
diff --git a/.gradle/7.1/fileHashes/fileHashes.lock b/.gradle/7.1/fileHashes/fileHashes.lock
new file mode 100644
index 0000000000..ea75f734e6
Binary files /dev/null and b/.gradle/7.1/fileHashes/fileHashes.lock differ
diff --git a/.gradle/7.1/gc.properties b/.gradle/7.1/gc.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000000..76c1b02ff1
Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000000..3d7d67fc0b
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Sun Sep 05 21:29:21 GMT+08:00 2021
+gradle.version=6.7
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000000..68e2bb5f7b
Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock
new file mode 100644
index 0000000000..6626e775d9
Binary files /dev/null and b/.gradle/checksums/checksums.lock differ
diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin
new file mode 100644
index 0000000000..e396e0221f
Binary files /dev/null and b/.gradle/checksums/md5-checksums.bin differ
diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin
new file mode 100644
index 0000000000..0972da5545
Binary files /dev/null and b/.gradle/checksums/sha1-checksums.bin differ
diff --git a/.gradle/configuration-cache/gc.properties b/.gradle/configuration-cache/gc.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000000..26d33521af
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/artifacts/ip_jar.xml b/.idea/artifacts/ip_jar.xml
new file mode 100644
index 0000000000..56728e7bc2
--- /dev/null
+++ b/.idea/artifacts/ip_jar.xml
@@ -0,0 +1,32 @@
+
+
+ $PROJECT_DIR$/out/artifacts/ip_jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml
new file mode 100644
index 0000000000..2f2c3c1210
--- /dev/null
+++ b/.idea/checkstyle-idea.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000000..fb7f4a8a46
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000000..b4a1cba615
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000000..fdc392fe87
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_0.xml b/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_0.xml
new file mode 100644
index 0000000000..d5714fb439
--- /dev/null
+++ b/.idea/libraries/Gradle__org_apiguardian_apiguardian_api_1_1_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_6_0.xml b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_6_0.xml
new file mode 100644
index 0000000000..c5efb83722
--- /dev/null
+++ b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_api_5_6_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_6_0.xml b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_6_0.xml
new file mode 100644
index 0000000000..ba48c80224
--- /dev/null
+++ b/.idea/libraries/Gradle__org_junit_jupiter_junit_jupiter_engine_5_6_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_6_0.xml b/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_6_0.xml
new file mode 100644
index 0000000000..e27f0c523f
--- /dev/null
+++ b/.idea/libraries/Gradle__org_junit_platform_junit_platform_commons_1_6_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_6_0.xml b/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_6_0.xml
new file mode 100644
index 0000000000..b31e1c9696
--- /dev/null
+++ b/.idea/libraries/Gradle__org_junit_platform_junit_platform_engine_1_6_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_base_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_base_11.xml
new file mode 100644
index 0000000000..b6dfdf2ede
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_base_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_base_linux_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_base_linux_11.xml
new file mode 100644
index 0000000000..5a7330326a
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_base_linux_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_base_mac_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_base_mac_11.xml
new file mode 100644
index 0000000000..cd4e83fa25
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_base_mac_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_base_win_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_base_win_11.xml
new file mode 100644
index 0000000000..30088c934b
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_base_win_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_controls_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_controls_11.xml
new file mode 100644
index 0000000000..f138b9dee9
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_controls_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_controls_linux_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_controls_linux_11.xml
new file mode 100644
index 0000000000..b109bcea43
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_controls_linux_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_controls_mac_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_controls_mac_11.xml
new file mode 100644
index 0000000000..72c5256215
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_controls_mac_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_controls_win_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_controls_win_11.xml
new file mode 100644
index 0000000000..ac5c448a44
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_controls_win_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_fxml_linux_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_linux_11.xml
new file mode 100644
index 0000000000..bb8cfbc8c5
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_linux_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_fxml_mac_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_mac_11.xml
new file mode 100644
index 0000000000..f14bb11c75
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_mac_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_fxml_win_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_win_11.xml
new file mode 100644
index 0000000000..d37a580c4e
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_fxml_win_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_graphics_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_11.xml
new file mode 100644
index 0000000000..67156165cf
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_graphics_linux_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_linux_11.xml
new file mode 100644
index 0000000000..d5f14706f2
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_linux_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_graphics_mac_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_mac_11.xml
new file mode 100644
index 0000000000..c5ebdfde9e
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_mac_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_openjfx_javafx_graphics_win_11.xml b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_win_11.xml
new file mode 100644
index 0000000000..f7ee348c71
--- /dev/null
+++ b/.idea/libraries/Gradle__org_openjfx_javafx_graphics_win_11.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml b/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml
new file mode 100644
index 0000000000..c0ad60c153
--- /dev/null
+++ b/.idea/libraries/Gradle__org_opentest4j_opentest4j_1_2_0.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000000..62269dfc31
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000000..1faf0f6b55
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/GUI_Trial_For_Duke.iml b/.idea/modules/GUI_Trial_For_Duke.iml
new file mode 100644
index 0000000000..3103ae3537
--- /dev/null
+++ b/.idea/modules/GUI_Trial_For_Duke.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/modules/GUI_Trial_For_Duke.test.iml b/.idea/modules/GUI_Trial_For_Duke.test.iml
new file mode 100644
index 0000000000..833e02af0c
--- /dev/null
+++ b/.idea/modules/GUI_Trial_For_Duke.test.iml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/ip.iml b/.idea/modules/ip.iml
new file mode 100644
index 0000000000..4a4ce55406
--- /dev/null
+++ b/.idea/modules/ip.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/ip.main.iml b/.idea/modules/ip.main.iml
new file mode 100644
index 0000000000..4a4ce55406
--- /dev/null
+++ b/.idea/modules/ip.main.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/ip.test.iml b/.idea/modules/ip.test.iml
new file mode 100644
index 0000000000..4739e83eae
--- /dev/null
+++ b/.idea/modules/ip.test.iml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/org.example.ip.iml b/.idea/modules/org.example.ip.iml
new file mode 100644
index 0000000000..4a4ce55406
--- /dev/null
+++ b/.idea/modules/org.example.ip.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/org.example.ip.main.iml b/.idea/modules/org.example.ip.main.iml
new file mode 100644
index 0000000000..4a4ce55406
--- /dev/null
+++ b/.idea/modules/org.example.ip.main.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/org.example.ip.test.iml b/.idea/modules/org.example.ip.test.iml
new file mode 100644
index 0000000000..1f5544e750
--- /dev/null
+++ b/.idea/modules/org.example.ip.test.iml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000000..797acea53e
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000000..94a25f7f4c
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
deleted file mode 100644
index 8e359a0145..0000000000
--- a/CONTRIBUTORS.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Contributors
-
-Display | Name | Github Profile | Homepage
----|:---:|:---:|:---:
- | Jeffry Lum | [Github](https://github.com/j-lum/) | [Homepage](https://se.kasugano.moe)
- | Damith C. Rajapakse | [Github](https://github.com/damithc/) | [Homepage](https://www.comp.nus.edu.sg/~damithch/)
-# I would like to join this list. How can I help the project
-
-For more information, please refer to our [contributor's guide](https://oss-generic.github.io/process/).
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000000..7e8fa9eb9b
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,42 @@
+plugins {
+ id 'java'
+}
+
+group 'org.example'
+version '1.0-SNAPSHOT'
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
+ testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
+ String javaFxVersion = '11'
+
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
+ implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
+}
+
+test {
+ useJUnitPlatform()
+}
+
+jar {
+ manifest {
+ attributes 'Main-Class': 'Launcher'
+ }
+ from {
+ configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
+ }
+}
\ No newline at end of file
diff --git a/build/classes/java/main/DialogBox.class b/build/classes/java/main/DialogBox.class
new file mode 100644
index 0000000000..7042d9b4bc
Binary files /dev/null and b/build/classes/java/main/DialogBox.class differ
diff --git a/build/classes/java/main/Duke.class b/build/classes/java/main/Duke.class
new file mode 100644
index 0000000000..af6baea0c5
Binary files /dev/null and b/build/classes/java/main/Duke.class differ
diff --git a/build/classes/java/main/Launcher.class b/build/classes/java/main/Launcher.class
new file mode 100644
index 0000000000..b7d6b3612f
Binary files /dev/null and b/build/classes/java/main/Launcher.class differ
diff --git a/build/classes/java/main/Main.class b/build/classes/java/main/Main.class
new file mode 100644
index 0000000000..57d2268289
Binary files /dev/null and b/build/classes/java/main/Main.class differ
diff --git a/build/classes/java/main/MainWindow.class b/build/classes/java/main/MainWindow.class
new file mode 100644
index 0000000000..87a70c3864
Binary files /dev/null and b/build/classes/java/main/MainWindow.class differ
diff --git a/build/classes/java/main/Storage/DeadlineTask.class b/build/classes/java/main/Storage/DeadlineTask.class
new file mode 100644
index 0000000000..9036dc61e9
Binary files /dev/null and b/build/classes/java/main/Storage/DeadlineTask.class differ
diff --git a/build/classes/java/main/Storage/EventsTask.class b/build/classes/java/main/Storage/EventsTask.class
new file mode 100644
index 0000000000..8de72aba6d
Binary files /dev/null and b/build/classes/java/main/Storage/EventsTask.class differ
diff --git a/build/classes/java/main/Storage/Parser$1.class b/build/classes/java/main/Storage/Parser$1.class
new file mode 100644
index 0000000000..73bac3b29b
Binary files /dev/null and b/build/classes/java/main/Storage/Parser$1.class differ
diff --git a/build/classes/java/main/Storage/Parser.class b/build/classes/java/main/Storage/Parser.class
new file mode 100644
index 0000000000..cc3838e499
Binary files /dev/null and b/build/classes/java/main/Storage/Parser.class differ
diff --git a/build/classes/java/main/Storage/Storage.class b/build/classes/java/main/Storage/Storage.class
new file mode 100644
index 0000000000..31a4fc3528
Binary files /dev/null and b/build/classes/java/main/Storage/Storage.class differ
diff --git a/build/classes/java/main/Storage/TodoTasks.class b/build/classes/java/main/Storage/TodoTasks.class
new file mode 100644
index 0000000000..f59968aea3
Binary files /dev/null and b/build/classes/java/main/Storage/TodoTasks.class differ
diff --git a/build/classes/java/main/Task/DeadlineException.class b/build/classes/java/main/Task/DeadlineException.class
new file mode 100644
index 0000000000..25446a2932
Binary files /dev/null and b/build/classes/java/main/Task/DeadlineException.class differ
diff --git a/build/classes/java/main/Task/EventsException.class b/build/classes/java/main/Task/EventsException.class
new file mode 100644
index 0000000000..d1da9d473e
Binary files /dev/null and b/build/classes/java/main/Task/EventsException.class differ
diff --git a/build/classes/java/main/Task/Task.class b/build/classes/java/main/Task/Task.class
new file mode 100644
index 0000000000..e1ab2acb35
Binary files /dev/null and b/build/classes/java/main/Task/Task.class differ
diff --git a/build/classes/java/main/Task/TaskList.class b/build/classes/java/main/Task/TaskList.class
new file mode 100644
index 0000000000..455e2fa8e1
Binary files /dev/null and b/build/classes/java/main/Task/TaskList.class differ
diff --git a/build/classes/java/main/Task/TaskTypes.class b/build/classes/java/main/Task/TaskTypes.class
new file mode 100644
index 0000000000..2bf9ecc3c7
Binary files /dev/null and b/build/classes/java/main/Task/TaskTypes.class differ
diff --git a/build/classes/java/main/Task/TodoException.class b/build/classes/java/main/Task/TodoException.class
new file mode 100644
index 0000000000..d9f3ea0bc0
Binary files /dev/null and b/build/classes/java/main/Task/TodoException.class differ
diff --git a/build/classes/java/main/Ui.class b/build/classes/java/main/Ui.class
new file mode 100644
index 0000000000..2a7404fd44
Binary files /dev/null and b/build/classes/java/main/Ui.class differ
diff --git a/build/libs/ip-1.0-SNAPSHOT.jar b/build/libs/ip-1.0-SNAPSHOT.jar
new file mode 100644
index 0000000000..7f1dcfc602
Binary files /dev/null and b/build/libs/ip-1.0-SNAPSHOT.jar differ
diff --git a/build/resources/main/META-INF/MANIFEST.MF b/build/resources/main/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..5ee19cb097
--- /dev/null
+++ b/build/resources/main/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: Main
+
diff --git a/build/resources/main/docs/Ui.png b/build/resources/main/docs/Ui.png
new file mode 100644
index 0000000000..c2a25851e1
Binary files /dev/null and b/build/resources/main/docs/Ui.png differ
diff --git a/build/resources/main/images/DaDuke.png b/build/resources/main/images/DaDuke.png
new file mode 100644
index 0000000000..d893658717
Binary files /dev/null and b/build/resources/main/images/DaDuke.png differ
diff --git a/build/resources/main/images/new_passport_photo_2020_Nov.jpg b/build/resources/main/images/new_passport_photo_2020_Nov.jpg
new file mode 100644
index 0000000000..1735172aa4
Binary files /dev/null and b/build/resources/main/images/new_passport_photo_2020_Nov.jpg differ
diff --git a/build/resources/main/view/DialogBox.fxml b/build/resources/main/view/DialogBox.fxml
new file mode 100644
index 0000000000..e433809947
--- /dev/null
+++ b/build/resources/main/view/DialogBox.fxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/resources/main/view/MainWindow.fxml b/build/resources/main/view/MainWindow.fxml
new file mode 100644
index 0000000000..99594b2e78
--- /dev/null
+++ b/build/resources/main/view/MainWindow.fxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/tmp/compileJava/source-classes-mapping.txt b/build/tmp/compileJava/source-classes-mapping.txt
new file mode 100644
index 0000000000..985bfeea9c
--- /dev/null
+++ b/build/tmp/compileJava/source-classes-mapping.txt
@@ -0,0 +1,30 @@
+Duke.java
+ Duke
+ Ui
+Launcher.java
+ Launcher
+Task/TaskList.java
+ Task.TaskList
+Main.java
+ Main
+Task/EventsException.java
+ Task.EventsException
+Task/TodoException.java
+ Task.TodoException
+Storage/Storage.java
+ Storage.DeadlineTask
+ Storage.EventsTask
+ Storage.Parser
+ Storage.Parser$1
+ Storage.Storage
+ Storage.TodoTasks
+Task/TaskTypes.java
+ Task.TaskTypes
+MainWindow.java
+ MainWindow
+DialogBox.java
+ DialogBox
+Task/Task.java
+ Task.Task
+Task/DeadlineException.java
+ Task.DeadlineException
diff --git a/build/tmp/jar/MANIFEST.MF b/build/tmp/jar/MANIFEST.MF
new file mode 100644
index 0000000000..f578f7960d
--- /dev/null
+++ b/build/tmp/jar/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: Launcher
+
diff --git a/docs/README.md b/docs/README.md
index 8077118ebe..a102d9eedd 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,28 +2,151 @@
## Features
-### Feature-ABC
+## Feature - Store history
-Description of the feature.
+Able to *store* previously inputs and *load* them upon next opening
+
+### Feature - AddTask
+
+Able to *add* new task
+
+### Feature - DeleteTask
+
+Able to *delete* tasks that have been done
+
+### Feature-prevent duplicate
+
+Able to *recognise* and *remove duplicated task* to prevent unnecessary task present in the note.
-### Feature-XYZ
-Description of the feature.
## Usage
-### `Keyword` - Describe action
+### `Keyword` - Todo *input action param*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] input action
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [T][] input action
+Now you have 1 tasks in the list.
+```
+
+### `Keyword` - Deadline *input action param* /by *input date param*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] *input action* *date*
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [D][] input action inpute date
+Now you have 1 tasks in the list.
+```
+### `Keyword` - Events *input action param* /at *input date param* *input day*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] *input action* *date* *day*
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [D][] input action inpute date input day
+Now you have 1 tasks in the list.
+```
-Describe the action and its outcome.
+### `Keyword` - list
-Example of usage:
+### Expected outcome:
-`keyword (optional arguments)`
+Programs displays a list of all the recorded task
-Expected outcome:
+### Description of the outcome.
-Description of the outcome.
+A list of all the task in their displayed format
```
expected output
+
+1. [D][] input action inpute date
+```
+
+### `Keyword` - done *input index*
+
+### Expected outcome:
+
+The specific recorded task with the index will be
+labelled as done.
+
+### Description of the outcome.
+
+Specific task will have its second box crossed to indicate done.
+
```
+expected output
+
+Nice! I've marked this task as done: [D][X] input action inpute date
+
+```
+### `Keyword` - delete *input index*
+
+### Expected outcome:
+
+The specific recorded task with the index will be
+removed.
+
+### Description of the outcome.
+
+Specific task will no longer be present in the list
+
+```
+expected output
+
+Now you have n tasks in the list.
+```
+
+### `Keyword` - bye
+
+### Expected outcome:
+
+Player exits the progam. Current list will be saved for subsequent opening.
+
+### Description of the outcome.
+
+Duke wishes goodbye.
+
+```
+expected output
+
+bye. Hope to see you again soon!
+```
+
diff --git a/docs/Ui.png b/docs/Ui.png
new file mode 100644
index 0000000000..c2a25851e1
Binary files /dev/null and b/docs/Ui.png differ
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 0000000000..2f7efbeab5
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1 @@
+theme: jekyll-theme-minimal
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000000..01092058eb
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,151 @@
+# User Guide
+
+## Features
+
+## Feature - Store history
+
+Able to *store* previously inputs and *load* them upon next opening
+
+### Feature - AddTask
+
+Able to *add* new task
+
+### Feature - DeleteTask
+
+Able to *delete* tasks that have been done
+
+### Feature-prevent duplicate
+
+Able to *recognise* and *remove duplicated task* to prevent unnecessary task present in the note.
+
+
+
+## Usage
+
+### `Keyword` - Todo *input action param*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] input action
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [T][] input action
+Now you have 1 tasks in the list.
+```
+
+### `Keyword` - Deadline *input action param* /by *input date param*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] *input action* *date*
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [D][] input action inpute date
+Now you have 1 tasks in the list.
+```
+### `Keyword` - Events *input action param* /at *input date param* *input day*
+
+### Expected outcome:
+
+Programs adds the *input action* to the a list object. Its
+recorded and available for subsequent action.
+
+### Description of the outcome.
+
+Message shows that the task has been record.
+Format [Type][isdone] *input action* *date* *day*
+Then shows how many existing task in the list
+
+```
+expected output
+
+Got it, I've added this task:
+ [D][] input action inpute date input day
+Now you have 1 tasks in the list.
+```
+
+### `Keyword` - list
+
+### Expected outcome:
+
+Programs displays a list of all the recorded task
+
+### Description of the outcome.
+
+A list of all the task in their displayed format
+
+```
+expected output
+
+1. [D][] input action inpute date
+```
+
+### `Keyword` - done *input index*
+
+### Expected outcome:
+
+The specific recorded task with the index will be
+labelled as done.
+
+### Description of the outcome.
+
+Specific task will have its second box crossed to indicate done.
+
+```
+expected output
+
+Nice! I've marked this task as done: [D][X] input action inpute date
+
+```
+### `Keyword` - delete *input index*
+
+### Expected outcome:
+
+The specific recorded task with the index will be
+removed.
+
+### Description of the outcome.
+
+Specific task will no longer be present in the list
+
+```
+expected output
+
+Now you have n tasks in the list.
+```
+
+### `Keyword` - bye
+
+### Expected outcome:
+
+Player exits the progam. Current list will be saved for subsequent opening.
+
+### Description of the outcome.
+
+Duke wishes goodbye.
+
+```
+expected output
+
+bye. Hope to see you again soon!
+```
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000000..e708b1c023
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..be52383ef4
--- /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.7-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000000..4f906e0c81
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/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..107acd32c4
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/out/production/resources/META-INF/MANIFEST.MF b/out/production/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..5ee19cb097
--- /dev/null
+++ b/out/production/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: Main
+
diff --git a/out/production/resources/images/DaDuke.png b/out/production/resources/images/DaDuke.png
new file mode 100644
index 0000000000..d893658717
Binary files /dev/null and b/out/production/resources/images/DaDuke.png differ
diff --git a/out/production/resources/images/new_passport_photo_2020_Nov.jpg b/out/production/resources/images/new_passport_photo_2020_Nov.jpg
new file mode 100644
index 0000000000..1735172aa4
Binary files /dev/null and b/out/production/resources/images/new_passport_photo_2020_Nov.jpg differ
diff --git a/out/production/resources/view/DialogBox.fxml b/out/production/resources/view/DialogBox.fxml
new file mode 100644
index 0000000000..e433809947
--- /dev/null
+++ b/out/production/resources/view/DialogBox.fxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/out/production/resources/view/MainWindow.fxml b/out/production/resources/view/MainWindow.fxml
new file mode 100644
index 0000000000..99594b2e78
--- /dev/null
+++ b/out/production/resources/view/MainWindow.fxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000000..972cd8b6b1
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,2 @@
+rootProject.name = 'ip'
+
diff --git a/src/main/java/DialogBox.java b/src/main/java/DialogBox.java
new file mode 100644
index 0000000000..9f512ed643
--- /dev/null
+++ b/src/main/java/DialogBox.java
@@ -0,0 +1,71 @@
+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.Insets;
+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.Background;
+import javafx.scene.layout.BackgroundFill;
+import javafx.scene.layout.CornerRadii;
+import javafx.scene.layout.HBox;
+import javafx.scene.paint.Color;
+
+/**
+ * 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) {
+ DialogBox userOutput = new DialogBox(text, img);
+ userOutput.setBackground(new Background(new BackgroundFill(Color.rgb(125, 125, 250),
+ CornerRadii.EMPTY,
+ Insets.EMPTY)));
+ return userOutput;
+ }
+
+ public static DialogBox getDukeDialog(String text, Image img) {
+ var db = new DialogBox(text, img);
+ db.flip();
+ db.setBackground(new Background(new BackgroundFill(Color.rgb(250, 125, 125),
+ CornerRadii.EMPTY,
+ Insets.EMPTY)));
+ return db;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Duke.java b/src/main/java/Duke.java
index 5d313334cc..499736c1aa 100644
--- a/src/main/java/Duke.java
+++ b/src/main/java/Duke.java
@@ -1,10 +1,181 @@
-public class Duke {
+import java.util.Scanner;
+import Storage.*;
+import Task.TaskList;
+import Task.Task;
+import Task.DeadlineException;
+import Task.TodoException;
+import Task.EventsException;
+
+public class Duke{
+ private final Ui userInterface = new Ui();
+
public static void main(String[] args) {
- String logo = " ____ _ \n"
+ Duke user = new Duke();
+ boolean end = true;
+ user.userInterface.greet();
+ user.userInterface.getDataInputList();
+ while (end) {
+ end = user.userInterface.echo();
+ System.out.println("__________________________________");
+ }
+ }
+
+ public String getResponse(String input) {
+ return userInterface.choiceOfAction(input);
+ }
+
+ /**
+ * Function returns the logo of the program.
+ * @return string containing the logo.
+ */
+ public final static String greet() {
+ return Ui.greet();
+ }
+}
+
+
+//deals with interactions with the user
+class Ui {
+ private final Storage store = new Storage();
+ private TaskList taskList = new TaskList();
+
+ /**
+ * Function returns the logo of the program.
+ * @return string containing the logo.
+ */
+ public final static String greet() {
+ String logo = "__________________________________\n"
+ +" ____ _ \n"
+ "| _ \\ _ _| | _____ \n"
+ "| | | | | | | |/ / _ \\\n"
+ "| |_| | |_| | < __/\n"
- + "|____/ \\__,_|_|\\_\\___|\n";
- System.out.println("Hello from\n" + logo);
+ + "|____/ \\__,_|_|\\_\\___|\n"
+ + "Hello! I'm Duke\n"
+ + "What can I do for you?\n"
+ +"__________________________________";
+
+ return logo;
+ }
+
+ /**
+ * generate the end message.
+ */
+ public String bye() {
+ store.saveListInFile("src/main/java/Duke.txt", taskList);
+ return "Bye. Hope to see you again soon!";
+ }
+ /**
+ * The original method to simply generate an echo message.
+ * Now only meant to decide if the user has decided to end
+ * the program.
+ * @return boolean
+ */
+ public boolean echo() {
+ Scanner user = new Scanner(System.in);
+ while(user.hasNextLine()) {
+ String input = user.nextLine();
+ if (choiceOfAction(input).equals("Bye. Hope to see you again soon!")) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * To decide base on the input what is the next action.
+ * The decision on whether to show list, set existing task to
+ * done, or to create and record new task.
+ * @param input by the user
+ * @return String message to be senr
+ */
+ public String choiceOfAction(String input) {
+ if (input.equals("bye")) {
+ return bye();
+ } else if (input.equals("list")) {
+ return taskList.toString();
+ } else {
+ String[] newInput = input.split(" ");
+ String instruction = newInput[0];
+ if (instruction.equals("done")) {
+ return doneAction(newInput);
+ } else if (instruction.equals("delete")) {
+ return deleteAction(newInput);
+ }else if (instruction.equals("find")) {
+ return findAction(newInput);
+ } else {
+ try {
+ if(store.isTaskDuplicate(input, taskList)) {
+ return "Input task has already been created!";
+ } else {
+ Task newTask = store.createTask(input);
+ return taskList.addTask(newTask);
+ }
+ } catch (TodoException | DeadlineException | EventsException tx) {
+ return tx.getLocalizedMessage();
+ } catch (Exception e) {
+ return e.getLocalizedMessage();
+ }
+ }
+ }
+ }
+
+ /**
+ * Encapsulation up the class structure.
+ */
+ public void getDataInputList() {
+ store.getDataInputList(this.taskList);
+ }
+
+ /**
+ * Function performs task when Done instruction is provided.
+ * @param newInput is a String Array containing the Done and index of the Task.
+ */
+ private String doneAction(String[] newInput) {
+ if (newInput.length < 2) {
+ return "Please input the index of the Task to be done!";
+ } else {
+ int index = Integer.parseInt(newInput[1]);
+ if (index <= taskList.getTaskList().size() && index > 0) {
+ taskList.getTaskList().get(index - 1).done();
+ return "Nice! I've marked this task as done: "
+ + " " + this.taskList.getTaskList().get(index - 1) + "\n";
+ } else {
+ return "invalid index";
+ }
+ }
+ }
+
+ /**
+ * Function perform the action of deleting a task when requested. It also catches
+ * the Exception throw.
+ * @param newInput is the String Array containing the index of the Task.
+ */
+ private String deleteAction(String[] newInput) {
+ try {
+ return taskList.deleteTask(newInput);
+ }catch (Exception e) {
+ return e.getLocalizedMessage();
+ }
+ }
+
+ /**
+ * Action find keywords in main TaskList the fits the request.
+ * @param newInput is a String Array that contains the keyword needed for the search.
+ * @return TaskList Object containing the searched Tasks.
+ */
+ private String findAction(String[] newInput) {
+ StringBuilder resultList = new StringBuilder("Here are the matching tasks in your list:\n");
+ if (newInput.length >= 2) {
+ String keyword = newInput[1];
+ for (Task curTask : this.taskList.getTaskList()) {
+ for (String information : curTask.getFinalAction().split(" ")) {
+ if (information.equals(keyword)) {
+ resultList.append(curTask)
+ .append("\n");
+ }
+ }
+ }
+ }
+ return resultList.toString();
}
}
diff --git a/src/main/java/Duke.txt b/src/main/java/Duke.txt
new file mode 100644
index 0000000000..c3dcaa55ef
--- /dev/null
+++ b/src/main/java/Duke.txt
@@ -0,0 +1 @@
+Todo r
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..87e990ff21
--- /dev/null
+++ b/src/main/java/Main.java
@@ -0,0 +1,30 @@
+import java.io.IOException;
+
+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();
+
+ @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();
+ e.getLocalizedMessage();
+ }
+ }
+}
\ 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..bae1507de9
--- /dev/null
+++ b/src/main/java/MainWindow.java
@@ -0,0 +1,55 @@
+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/DaDuke.png"));
+ private Image dukeImage = new Image(this.getClass().getResourceAsStream("/images/new_passport_photo_2020_Nov.jpg"));
+
+ /**
+ * Creates the initial local and prompt.
+ */
+ @FXML
+ public void initialize() {
+ scrollPane.vvalueProperty().bind(dialogContainer.heightProperty());
+ dialogContainer.getChildren().addAll(
+ DialogBox.getDukeDialog(Duke.greet(), 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();
+ }
+}
diff --git a/src/main/java/Storage/Storage.java b/src/main/java/Storage/Storage.java
new file mode 100644
index 0000000000..605de8902e
--- /dev/null
+++ b/src/main/java/Storage/Storage.java
@@ -0,0 +1,238 @@
+package Storage;
+
+import java.io.*;
+import java.util.Arrays;
+import Task.TaskList;
+import Task.Task;
+import Task.TaskTypes;
+import Task.DeadlineException;
+import Task.TodoException;
+import Task.EventsException;
+
+public class Storage {
+ private final Parser parser= new Parser();
+ /**
+ * Function obtain data from previous file records. Creates the file if it's not present.
+ * @param lst is the target TaskList
+ */
+ public void getDataInputList(TaskList lst) {
+ try {
+ File f = new File("src/main/java/Duke.txt");
+ if(!f.exists()){
+ f.createNewFile();
+ }
+ FileReader reader = new FileReader(f);
+ BufferedReader br = new BufferedReader(reader); //creates a buffering character input stream
+ String line;
+ Task curTask;
+
+ while ((line = br.readLine()) != null) {
+ boolean isCurTaskDone = false;
+ String[] data = line.split(" ");
+ int lengthLimit = data.length;
+ String taskData = "";
+
+ if (data[data.length - 1].equals("done")){
+ isCurTaskDone = true;
+ lengthLimit -= 1;
+ }
+ try {
+ for (int i = 0; i < lengthLimit; i++) {
+ taskData = taskData.concat(data[i] + " ");
+ }
+ curTask = parser.createTask(taskData);
+ if (isCurTaskDone) {
+ curTask.done();
+ }
+ lst.getTaskList().add(curTask);
+ } catch (Exception e) {
+ System.out.println(e.getLocalizedMessage());
+ }
+ }
+ }catch (FileNotFoundException f) {
+ System.out.println(f.getLocalizedMessage());
+ }catch(IOException io){
+ System.out.println(io.getLocalizedMessage());
+ }
+ }
+
+ /**
+ * Save the current Task in the target file.
+ * @param filename of the file for saving of data from tasklist.
+ */
+ public void saveListInFile(String filename, TaskList lst) {
+ try {
+ //clear the current data file
+ PrintWriter pw = new PrintWriter(filename);
+ pw.close();
+ //write into the file
+ File tempFile = new File(filename);
+ BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile));
+ for (Task task : lst.getTaskList()) {
+ writer.write(parser.formatTaskIntoCommands(task));
+ }
+ writer.close();
+ }catch (IOException io) {
+ }
+ }
+
+ /**
+ * Create the correct Task using the information in the input String
+ * @param input contains data regarding the action and date of the Task.
+ * @return the correct Task.
+ * @throws Exception if the input is invalid.
+ */
+ public Task createTask(String input) throws Exception{
+ return parser.createTask(input);
+ }
+ /**
+ * Function detects if the possible Task created by the input is
+ * already presented in the current TaskList
+ * @param action is a string contains the command.
+ * @param curTaskList is the current TaskList object in the main Duke
+ * @return a boolean value shows if the action creates a duplicate task
+ */
+ public boolean isTaskDuplicate(String action, TaskList curTaskList) {
+ return parser.isTaskDuplicate(action, curTaskList);
+ }
+}
+
+// deals with making sense of the user command
+class Parser {
+
+ /**
+ * Function reformat Task in TaskList back to valid format input commands.
+ * @param task to be reformatted and store in file.
+ * @return String command.
+ */
+ public String formatTaskIntoCommands(Task task) {
+ String[] taskInfo = task.toString().split(" ");
+ String output;
+ String separator = "";
+ String keyword = "";
+ taskInfo = Arrays.copyOfRange(taskInfo, 1, taskInfo.length);
+ switch (task.getType()) {
+ case Todo:
+ output = "Todo";
+ break;
+
+ case Deadline: {
+ output = "Deadline";
+ separator = "(by:";
+ keyword = "by";
+ break;
+ }
+
+ case Events: {
+ output = "Events";
+ separator = "(at:";
+ keyword = "at";
+ break;
+ }
+ default: return "error type";
+ }
+ for (String str : taskInfo) {
+ if (!str.equals(")") && !str.equals("")) {
+ if (str.equals(separator)) {
+ str = "/" + keyword;
+ }
+ output = output.concat(" " + str);
+ }
+ }
+ if (task.getIsDone()) {
+ output += " done";
+ }
+ return output + "\n";
+ }
+
+ /**
+ * Function detects if the possible Task created by the input is
+ * already presented in the current TaskList
+ * @param action is a string contains the command.
+ * @param curTaskList is the current TaskList object in the main Duke
+ * @return a boolean value shows if the action creates a duplicate task
+ */
+ public boolean isTaskDuplicate(String action, TaskList curTaskList) {
+ for (Task curTask : curTaskList.getTaskList()) {
+ String s = formatTaskIntoCommands(curTask);
+ String d = action.concat("\n");
+ if (formatTaskIntoCommands(curTask).equals(action.concat("\n"))) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Function able to read the input the judge which Task to use.
+ * @param action contains information for what task to be created.
+ * @return the task created.
+ * @throws Exception if format is invalid.
+ */
+ public Task createTask(String action) throws Exception{
+ // separate using the / as its the point of the date
+ String[] dataOfAction = action.split("/")[0].split(" ");
+ String type = dataOfAction[0];
+ //decide the correct header
+ switch (type) {
+ case ("Todo"): return new TodoTasks(action);
+
+ case ("Deadline"): return new DeadlineTask(action);
+
+ case ("Events") : return new EventsTask(action);
+
+ default: throw new Exception("Error type");
+ }
+ }
+}
+
+class TodoTasks extends Task{
+ /**
+ * constructor for Task.
+ *
+ * @param action contains all the information to build a TodoTask.
+ * @throws TodoException if the String action is invalid.
+ */
+ public TodoTasks(String action) throws TodoException {
+ super(action, "[T][] ", TaskTypes.Todo);
+ if (action.split(" ").length < 2){
+ throw new TodoException("OOPS!!! The description of a todo cannot be empty.");
+ }
+ }
+}
+
+class DeadlineTask extends Task{
+ /**
+ * constructor for Task.
+ *
+ * @param action containinf all the data needed for the creation of Deadline Task.
+ * @throws DeadlineException if the String action is invalid.
+ */
+ public DeadlineTask(String action) throws DeadlineException {
+ super(action, "[D][] ", TaskTypes.Deadline);
+ if (action.split("/").length < 2) {
+ throw new DeadlineException("incorrect format for deadline task");
+ }
+ if (action.split("/")[1].split(" ").length < 2) {
+ throw new DeadlineException("incorrect date format for Deadline task");
+ }
+ }
+}
+
+class EventsTask extends Task{
+ /**
+ * constructor for Task.
+ *
+ * @param action contains all the data need for the creation of the EventTasks.
+ * @throws EventsException if the action is invalid.
+ */
+ public EventsTask(String action) throws EventsException {
+ super(action, "[E][] ", TaskTypes.Events);
+ if (action.split("/").length < 2){
+ throw new EventsException("incorrect format for Events task");
+ }
+ }
+}
+
+
+
diff --git a/src/main/java/Task/DeadlineException.java b/src/main/java/Task/DeadlineException.java
new file mode 100644
index 0000000000..7b206ba97c
--- /dev/null
+++ b/src/main/java/Task/DeadlineException.java
@@ -0,0 +1,7 @@
+package Task;
+
+public class DeadlineException extends Exception {
+ public DeadlineException(String message) {
+ super(message);
+ }
+}
diff --git a/src/main/java/Task/EventsException.java b/src/main/java/Task/EventsException.java
new file mode 100644
index 0000000000..03adaa49df
--- /dev/null
+++ b/src/main/java/Task/EventsException.java
@@ -0,0 +1,7 @@
+package Task;
+
+public class EventsException extends Exception {
+ public EventsException(String message) {
+ super(message);
+ }
+}
diff --git a/src/main/java/Task/Task.java b/src/main/java/Task/Task.java
new file mode 100644
index 0000000000..bb3d484cc9
--- /dev/null
+++ b/src/main/java/Task/Task.java
@@ -0,0 +1,107 @@
+package Task;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import Task.TaskTypes;
+
+//deals with loading tasks from the file and saving tasks in the file.
+public class Task {
+ private String done;
+ private String[] dataOfAction;
+ private String finalAction = "";
+ private final TaskTypes type;
+ private boolean isDone = false;
+ private LocalDate localDate;
+
+ /**
+ * Constructor for the Task.
+ * @param action is what to be done.
+ * @param done is the tick box before the task.
+ * @param type is what type of task to be created.
+ */
+ public Task(String action, String done, TaskTypes type) {
+ this.done = done;
+ this.type = type;
+ dataOfAction = action.split("/")[0].split(" ");
+ for (int i = 1; i < dataOfAction.length; i++) {
+ finalAction = finalAction.concat(dataOfAction[i] + " ");
+ }
+ if (action.split("/").length > 1) {
+ String day = setDate(action);
+ finalAction = finalAction.concat(day);
+ }
+ }
+
+ /**
+ * Create a tail made up of the deadline.
+ * @param inputs String containing the date with some other information.
+ * @return String containing only the date with information correctly organised.
+ */
+ private String setDate(String inputs) {
+ String[] data = inputs.split(" ");
+ int pos = 0;
+ String keywords = "";
+ if (type.equals(TaskTypes.Deadline)) {
+ keywords = "by";
+ } else if (type.equals(TaskTypes.Events)) {
+ keywords = "at";
+ }
+ for (String str : data) {
+ if (str.equals("/" + keywords)) {
+ break;
+ }
+ pos += 1;
+ }
+
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("d/MM/yyyy");
+ String date = data[pos + 1];
+ this.localDate = LocalDate.parse(date, formatter);
+
+ String output = " (" + keywords + ": ";
+ for (int i = pos + 1 ;i < data.length; i++) {
+ output = output.concat(" " + data[i]);
+ }
+ return output + " )";
+ }
+ /**
+ * modify the task message if done.
+ */
+ public void done() {
+ done = done.substring(0, 3) + "[X] ";
+ this.isDone = true;
+ }
+ /**
+ * Override the original toString method to generate the correct value.
+ * @return String representation of the Task, which is presentable at the terminal.
+ */
+ public String toString() {
+ return done + finalAction;
+ }
+
+ /////////////////getters////////////////////////
+
+ /**
+ * get Task Type
+ * @return Task Type from the enum
+ */
+ public TaskTypes getType() {
+ return type;
+ }
+
+ /**
+ * get isDone of this Task.
+ * @return boolean value of isDone.
+ */
+ public boolean getIsDone() {
+ return isDone;
+ }
+
+ /**
+ * Getter to return the finalAction String of the Task.
+ * @return finalAction.
+ */
+ public String getFinalAction() {
+ return finalAction;
+ }
+}
+
diff --git a/src/main/java/Task/TaskList.java b/src/main/java/Task/TaskList.java
new file mode 100644
index 0000000000..b790d88ec1
--- /dev/null
+++ b/src/main/java/Task/TaskList.java
@@ -0,0 +1,79 @@
+package Task;
+import Task.TaskTypes;
+
+import java.util.ArrayList;
+
+//contains the task list e.g., it has operations to add/delete tasks in the list
+public class TaskList {
+ private ArrayList taskList = new ArrayList<>();
+ /**
+ * Getter to obtain the TaskList.
+ * @return the TaskList.
+ */
+ public ArrayList getTaskList() {
+ return this.taskList;
+ }
+
+ /**
+ * function adds a new Task into the taskList if valid.
+ * @param newTask is the newly created Task to be added to the task list.
+ */
+ public String addTask(Task newTask) {
+ taskList.add(newTask);
+ return new StringBuilder().append("Got it. I've added this task: \n")
+ .append(" ")
+ .append(newTask)
+ .append("\n")
+ .append("Now you have ")
+ .append(Integer.toString(taskList.size()))
+ .append(" tasks in the list.\n").toString();
+ }
+
+ /**
+ * Function adds a new Task into the tempList as a result of find request without
+ * breaking the encapsulation. So no need to print message.
+ * @param newTask is the newly created Task to be added to the tempList.
+ */
+ public void addTaskWithoutMessage(Task newTask) {
+ taskList.add(newTask);
+ }
+ /**
+ * function removes the task located at the index of the task list.
+ *
+ * @param newInput contains information for the Task to be deleted.
+ * @throws Exception if the index provided is not within valid range.
+ */
+ public String deleteTask(String[] newInput ) throws Exception{
+
+ if (newInput.length < 2) {
+ throw new Exception("invalid Syntax for delete instruction");
+ } else {
+ int index = Integer.parseInt(newInput[1]);
+ if (index > 0 && index <= taskList.size()) {
+ System.out.println("Noted. I've removed this task: ");
+ System.out.println(" " + taskList.get(index - 1).toString());
+ taskList.remove(index - 1);
+ return "Now you have "+ Integer.toString(taskList.size())+ "tasks in the list.\n";
+ } else {
+ throw new Exception("index not within valid range");
+ }
+ }
+ }
+
+ /**
+ * create a message to show all the tasks and their states.
+ */
+ @Override
+ public String toString() {
+ int count = 0;
+ StringBuilder resultTable = new StringBuilder();
+ for (Task action : taskList ) {
+ count++;
+ resultTable.append(count)
+ .append(". ")
+ .append(action.toString())
+ .append("\n");
+ }
+ return resultTable.toString();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/Task/TaskTypes.java b/src/main/java/Task/TaskTypes.java
new file mode 100644
index 0000000000..8380a6e8b7
--- /dev/null
+++ b/src/main/java/Task/TaskTypes.java
@@ -0,0 +1,7 @@
+package Task;
+
+public enum TaskTypes {
+ Todo,
+ Deadline,
+ Events
+}
diff --git a/src/main/java/Task/TodoException.java b/src/main/java/Task/TodoException.java
new file mode 100644
index 0000000000..8ebed52613
--- /dev/null
+++ b/src/main/java/Task/TodoException.java
@@ -0,0 +1,7 @@
+package Task;
+
+public class TodoException extends Exception {
+ public TodoException(String message) {
+ super(message);
+ }
+}
diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000000..5ee19cb097
--- /dev/null
+++ b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: Main
+
diff --git a/src/main/resources/docs/Ui.png b/src/main/resources/docs/Ui.png
new file mode 100644
index 0000000000..c2a25851e1
Binary files /dev/null and b/src/main/resources/docs/Ui.png differ
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/new_passport_photo_2020_Nov.jpg b/src/main/resources/images/new_passport_photo_2020_Nov.jpg
new file mode 100644
index 0000000000..1735172aa4
Binary files /dev/null and b/src/main/resources/images/new_passport_photo_2020_Nov.jpg differ
diff --git a/src/main/resources/view/DialogBox.fxml b/src/main/resources/view/DialogBox.fxml
new file mode 100644
index 0000000000..e433809947
--- /dev/null
+++ b/src/main/resources/view/DialogBox.fxml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/resources/view/MainWindow.fxml b/src/main/resources/view/MainWindow.fxml
new file mode 100644
index 0000000000..99594b2e78
--- /dev/null
+++ b/src/main/resources/view/MainWindow.fxml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+