Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions frenchie.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[T][ ] a
[T][ ] fk spider
[T][ ] mom
[T][ ] dad
[T][ ] uncle
[T][ ] fuck
[T][ ] nabei
[T][X] auntie
1 change: 1 addition & 0 deletions src/main/java/Frenchie/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum Command {
event,
invalid,
find,
help,
bye

}
3 changes: 3 additions & 0 deletions src/main/java/Frenchie/Frenchie.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ public String getResponse(String input) {
output.append(ui.findMessage());
output.append(tasks.returnMatchTasks(keyword));
return output.toString();
case help:
output.append(ui.helpMessage());
return output.toString();
default:
return "OOPS!!! That is an invalid command!\n "
+ "NOTE: Dates have to be entered in the dd/MM/yyyy HH:mm format!";
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/Frenchie/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public static Command parseCommand(String input) {
return Command.delete;
case "find":
return Command.find;
case "help":
return Command.help;
default:
return Command.invalid;
}
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/Frenchie/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ public String findMessage() {
return "Here are the matching tasks in your list: \n";
}

public String helpMessage() {
String output = "Quickstart guide: \n"
+ "You have 3 different tasks you can add to Frenchie: \n"
+ " 1. todo taskname\n"
+ " 2. deadline taskname /by dd/MM/yyyy HH:mm \n"
+ " 3. event taskname /from dd/MM/yyyy HH:mm /to dd/MM/yyyy HH:mm \n"
+ "Ensure you input the tasks in the above format for Frenchie to function as intended. \n"
+ "Other functions include: \n"
+ "list - To list all tasks stored in the TaskList \n"
+ "mark taskIndex - mark the task of index taskIndex as done \n"
+ "unmark taskIndex - mark the task of index taskIndex as incomplete \n"
+ "delete taskIndex - delete the task of index taskIndex from the list \n"
+ "find keyword - list out all tasks that contain the keyword in their task name";
return output;
}

public void closeScanner() {
scanner.close();
}
Expand Down