From 69955227de8b7c80960583da58d0a8f1411afdfd Mon Sep 17 00:00:00 2001 From: geeeetyx Date: Thu, 16 Feb 2023 20:53:24 +0800 Subject: [PATCH] fix: updated save file path --- src/main/java/META-INF/MANIFEST.MF | 3 +++ src/main/java/duke.txt | 2 -- src/main/java/duke/Duke.java | 4 ++-- src/main/java/duke/print/Print.java | 1 + 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 src/main/java/META-INF/MANIFEST.MF delete mode 100644 src/main/java/duke.txt diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 000000000..2c9a9745c --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: duke.Duke + diff --git a/src/main/java/duke.txt b/src/main/java/duke.txt deleted file mode 100644 index 15d80e218..000000000 --- a/src/main/java/duke.txt +++ /dev/null @@ -1,2 +0,0 @@ -T|X|read book -T| |return book diff --git a/src/main/java/duke/Duke.java b/src/main/java/duke/Duke.java index 8a2571c38..fe9ba3f11 100644 --- a/src/main/java/duke/Duke.java +++ b/src/main/java/duke/Duke.java @@ -21,14 +21,14 @@ public class Duke { static final int USER_INPUT_EXPECTED_SIZE = 2; - static final String FILE_PATH = "src/main/java/duke.txt"; + static final String FILE_PATH = "./duke.txt"; public static void main(String[] args) { showWelcomeMessage(); File F = new File(FILE_PATH); if (!F.exists()) { - new File("duke.txt"); + F = new File("./duke.txt"); } ArrayList taskList = new ArrayList<>(); diff --git a/src/main/java/duke/print/Print.java b/src/main/java/duke/print/Print.java index 0b4d905bb..d028c52d9 100644 --- a/src/main/java/duke/print/Print.java +++ b/src/main/java/duke/print/Print.java @@ -75,6 +75,7 @@ public static void showWelcomeMessage() { println(" mark [task number] --> to mark a task as done"); println(" unmark [task number] --> to unmark a task (i.e. not done)"); println(" list --> to show the lists of tasks"); + println(" delete [task number] --> to delete a task"); println(" bye --> to exit the program"); println("");