diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index ee14e5317b1..e0d124e448d 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -191,7 +191,7 @@ The following sequence diagram shows how a filter operation goes through the `Lo ![FilterSequenceDiagram-Logic](images/FilterSequenceDiagram-Logic.png) -
:information_source: **Note:** The lifeline for `FilterCommand` and `GradeSubjectFilterPredicate` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +
:information_source: **Note:** The lifeline for `FilterCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
@@ -208,8 +208,8 @@ The following activity diagram summarizes what happens when a tutor executes a f * Alternative 1: Filtered address book result can be saved, since in practice, there will only be a few combinations of filters. * Pros: Operation will be fast as the number of students increases. * Cons: More memory usage. -* Alternative 2: Introduce command history to avoid typing long commands. - * Pros: Useful for the entire application, and would use less memory (e.g. storing the first 10 commands). +* Alternative 2 (Implemented): Introduce command history to avoid typing long commands. + * Pros: Useful for the entire application, and would use less memory compared to alternative 1. (e.g. storing the first 10 commands). * Cons: Harder to implement. ### Payment Command @@ -359,17 +359,17 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Extensions** * 1a. Parameters given are invalid. - + * 1a1. TutorsGo shows an error message. - + Use case ends. -**Use case: Adding a person** +**Use case: Adding a student** **MSS** -1. Tutor adds a person +1. Tutor adds a student. 2. TutorsGo shows a success message. Use case ends. @@ -397,7 +397,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 1a. Tutor enters the command he/she wants to run. * 1a1. TutorsGo shows output of command. - + Use case ends. @@ -437,7 +437,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli ### Non-Functional Requirements 1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. -2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage. +2. Should be able to hold up to 1000 students without a noticeable sluggishness in performance for typical usage. 3. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. 4. Should handle errors without crashing 5. Should be able to function in offline environments @@ -480,29 +480,76 @@ testers are expected to do more *exploratory* testing. 1. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained. -1. _{ more test cases …​ }_ +### Adding a student + +1. Adding a student to the address book. + + 1. Prerequisites: None. + + 1. Test case: `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 g/B+ s/Mathematics d/2024-02-03 1800`
+ Expected: Contact is added at the bottom of the list. Details of the newly added contact shown in the status message. -### Deleting a person +### Editing a student -1. Deleting a person while all persons are being shown +1. Editing a student while all students are being shown - 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list. + 1. Prerequisites: List all students using the `list` command. Multiple students in the list. + + 1. Test case: `edit 1 p/91234567 e/johndoe@example.com`
+ Expected: First contact's phone number and email address changed accordingly. Details of the edited contact shown in the status message. + +### Deleting a student + +1. Deleting a student while all students are being shown + + 1. Prerequisites: List all students using the `list` command. Multiple students in the list. 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. + Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. + Expected: No student is deleted. Error details shown in the status message. Status bar remains the same. 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
Expected: Similar to previous. -1. _{ more test cases …​ }_ -### Saving data +### Filtering a student by grade/subject + +1. Filtering a student in the address book. + + 1. Prerequisites: Multiple students in the list, with `GRADE` = `B+` and `SUBJECT` = `Mathematics` manually assigned to at least one student. + + 1. Test case: `filter g/B+`
+ Expected: One or more students are returned from the list. Details of the filter and number of students returned shown in status message. + + 1. Test case: `filter g/B+ s/Mathematics`
+ Expected: Similar to previous. + + 1. Test case: `filter g/A`
+ Expected: No student returned from the list. Details of the filter and number of students returned shown in status message. + + 1. Other incorrect filter commands to try: `filter g/x s/y` (where x and y are invalid inputs described in User Guide)
+ Expected: Nothing happens to the current list. Error details shown in the status message. + + +### Check command history + +1. Checking command history on current instance of address book. + + 1. Prerequisites: At least one successful command ran besides `history` command itself. + + 1. Test case: `history`
+ Expected: returns a new list of at least one successful command. Success message shown on status bar. + +### Re-run command from command history + +1. Re-run command history on current instance of address book. -1. Dealing with missing/corrupted data files + 1. Prerequisites: At least one successful command ran besides `history` command itself. - 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ + 1. Test case: `history 1`
+ Expected: The first successful command on the command history list will run again. Status message dependent on the first command. -1. _{ more test cases …​ }_ + 1. Other incorrect history commands to try: `history x` (where x is larger than the list size)
+ Expected: Nothing happens to the current list. Error details shown in the status message. diff --git a/docs/UserGuide.md b/docs/UserGuide.md index e70e3590f68..959d53449c6 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -5,17 +5,18 @@ title: User Guide TutorsGo is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, TutorsGo can get your contact management tasks done faster than traditional GUI apps. -## Why TutorsGo? - -* Calendar Integration: Seamlessly plan tutoring sessions with an integrated calendar view, enabling easy lookup of upcoming lessons and schedules. -* Comprehensive Student Profiles: Access student grades, subjects, notes and more at your fingertips, allowing for easy lookup of everything you need to know about your student. -* Payment Tracking Made Simple: Keep tabs on payments effortlessly, ensuring financial matters are organized and up-to-date. * Table of Contents {:toc} -------------------------------------------------------------------------------------------------------------------- +## Why TutorsGo? + +* Calendar Integration: Seamlessly plan tutoring sessions with an integrated calendar view, enabling easy lookup of upcoming lessons and schedules. +* Comprehensive Student Profiles: Access student grades, subjects, notes and more at your fingertips, allowing for easy lookup of everything you need to know about your student. +* Payment Tracking Made Simple: Keep tabs on payments effortlessly, ensuring financial matters are organized and up-to-date. + ## Quick start 1. Ensure you have Java `11` or above installed in your Computer. @@ -68,7 +69,9 @@ TutorsGo is a **desktop app for managing contacts, optimized for use via a Comma * `GRADE` parameter input (i.e. `g/GRADE`) follows the NUS grading system. (i.e. [A+, A, A-, B+, B, B-, C+, C, D+, D, F]) -* `GRADE` and `SUBJECT` are currently both independent fields, i.e. `GRADE` can be assigned despite not having a `SUBJECT`. +* `GRADE` and `SUBJECT` are currently both independent fields, i.e. `GRADE` can be assigned despite not having a `SUBJECT`. + +* At most 1 `GRADE` and 1 `SUBJECT` can be assigned per student. * `PAYMENT` should either be `Paid` or `Not Paid` @@ -102,7 +105,7 @@ A student can have any number of tags and datetimes (including 0) Examples: * `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01 g/B+ s/Mathematics d/2024-02-03 1800` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567` +* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Betsy Avenue p/91234567` ### Listing all students : `list` @@ -152,7 +155,7 @@ Filters and shows a list of students who has the specified grade and/or subject. Entering [list](#listing-all-students--list) will bring back the full address book. -
:bulb: **Note:** +
:information_source: **Note:** Filtering will always occur with the whole address book, regardless of what the user sees on the student list.
@@ -167,7 +170,7 @@ Format: `filter [g/GRADE] [s/SUBJECT]` Examples: * `filter g/A` return students with grade: `A` -![filter Grade A](images/filterGradeA.png) +![filter Grade A](images/FilterGradeA.png) * `filter g/B+ s/Maths` returns students with grade: `B+` and subject: `Maths` ![filter Grade A](images/filterGradeBPlusSubjectMaths.png) @@ -214,6 +217,10 @@ Enter [list](#listing-all-students--list) to return back to the student list. Format syntax and more information below. +
:information_source: **Note:** +Commands that are saved are not persistent. (i.e. The commands that are saved in one instance will be lost after closing the app.) +
+ Format: `history [INDEX]` * Upon entering `history` (i.e. leaving whitespace / not entering any index): @@ -222,7 +229,7 @@ Format: `history [INDEX]` * Lists at most 10 successful commands. * Upon entering `history [INDEX]`: - * It will re-run the command that was specified by the index. + * It will re-run the command that was specified by the index. * The index here refers to the index number shown in the command history list. * The index **must be a positive integer**, and should be within the list's boundaries. * The output message is determined by the re-run command. (i.e. `history [INDEX]` itself does not have any success message.) @@ -232,7 +239,7 @@ Examples: * `history` returns a command history list. ![history](images/commandHistory.png) -* `history 1` runs the `list` command and returns the student list. It also outputs the success message of `list`. +* Upon running `history 1` from the result above, it runs the `list` command and returns the student list. It also outputs the success message of `list`. ![history 1](images/commandHistory1.png) @@ -292,7 +299,7 @@ Team size: 4 ## Command summary -Action | Format, Examples +Action | Format, Examples --------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------- **Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` **Clear** | `clear` diff --git a/docs/diagrams/FilterSequenceDiagram-Logic.puml b/docs/diagrams/FilterSequenceDiagram-Logic.puml index 7ebbe87b080..e05f6fcee06 100644 --- a/docs/diagrams/FilterSequenceDiagram-Logic.puml +++ b/docs/diagrams/FilterSequenceDiagram-Logic.puml @@ -48,7 +48,6 @@ FilterCommand --> LogicManager : commandResult deactivate FilterCommand FilterCommand -[hidden]-> LogicManager : commandResult destroy FilterCommand -destroy GradeSubjectFilterPredicate [<--LogicManager deactivate LogicManager diff --git a/docs/images/FilterSequenceDiagram-Logic.png b/docs/images/FilterSequenceDiagram-Logic.png index 41fa75e4121..728c45a1249 100644 Binary files a/docs/images/FilterSequenceDiagram-Logic.png and b/docs/images/FilterSequenceDiagram-Logic.png differ