Skip to content

Commit

Permalink
Add Help Command and expected output.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronxujiachen committed Oct 16, 2023
1 parent 8b83607 commit e93ce50
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/seedu/nuscents/ui/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static void showWelcomeMessage() {
System.out.println("Hello from\n" + LOGO);
System.out.println(LINE);
System.out.println("What can I do for you?");
System.out.println("Hint: To view a list of all possible commands, please enter 'help'.");
System.out.println(LINE);
}

Expand Down Expand Up @@ -89,17 +90,16 @@ public static void showReadDataError() {

public static void showHelpMenu() {
System.out.println(LINE);
System.out.println("- `list` :\n Shows a list of all tasks.\n"
+ "- `todo DESCRIPTION` :\n Adds a todo to the current list of tasks.\n"
+ "- `deadline DESCRIPTION /by DATETIME` :\n Adds a deadline to the current list of tasks.\n"
+ "- `event DESCRIPTION /from START_DATETIME /to END_DATETIME` :\n"
+ " Adds an event to the current list of tasks.\n"
+ "- `find KEYWORD` :\n Finds tasks whose description contain the given keyword.\n"
+ "- `delete INDEX` :\n Deletes the specified task from the list of tasks.\n"
+ "- `mark INDEX` :\n Marks the specified task from the list of tasks as done.\n"
+ "- `unmark INDEX` :\n Marks the specified task from the list of tasks as not done.\n"
+ "- `bye` :\n Exits the program.");
System.out.println("- `list` :\n Show a list of all entries.\n"
+ "- `allowance /amt AMOUNT /date DATE /desc DESCRIPTION "
+ "[/note ADDITIONAL_INFORMATION]` :\n Add an allowance.\n"
+ "- `expense /amt AMOUNT /date DATE /desc DESCRIPTION "
+ "[/note ADDITIONAL_INFORMATION]` :\n Add an expense.\n"
+ "- `delete ENTRY_NUMBER` :\n Delete an entry.\n"
+ "- `view ENTRY_NUMBER` :\n View an entry detail.\n"
+ "- `exit` :\n Exit the program.");
System.out.println(LINE);
}

}

15 changes: 15 additions & 0 deletions text-ui-test/EXPECTED.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ Hello from

-------------------------------------------------------------------------------
What can I do for you?
Hint: To view a list of all possible commands, please enter 'help'.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
OOPS!!! I'm sorry, but I don't know what that means :-(
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
- `list` :
Show a list of all entries.
- `allowance /amt AMOUNT /date DATE /desc DESCRIPTION [/note ADDITIONAL_INFORMATION]` :
Add an allowance.
- `expense /amt AMOUNT /date DATE /desc DESCRIPTION [/note ADDITIONAL_INFORMATION]` :
Add an expense.
- `delete ENTRY_NUMBER` :
Delete an entry.
- `view ENTRY_NUMBER` :
View an entry detail.
- `exit` :
Exit the program.
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Thank you for using NUScents. Hope to see you again soon!
-------------------------------------------------------------------------------
1 change: 1 addition & 0 deletions text-ui-test/input.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
James
help
exit

0 comments on commit e93ce50

Please sign in to comment.