Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103-F15-2#170 from AL-ZT/update-develo…
Browse files Browse the repository at this point in the history
…per-guide

Minor update to UG and DG
  • Loading branch information
Hwww23 authored Apr 14, 2024
2 parents 4345226 + 846fd08 commit 9b92629
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 33 deletions.
87 changes: 67 additions & 20 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The following sequence diagram shows how a filter operation goes through the `Lo

![FilterSequenceDiagram-Logic](images/FilterSequenceDiagram-Logic.png)

<div markdown="span" class="alert alert-info">: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.
<div markdown="span" class="alert alert-info">: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.

</div>

Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -480,29 +480,76 @@ testers are expected to do more *exploratory* testing.
1. Re-launch the app by double-clicking the jar file.<br>
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`<br>
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`<br>
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`<br>
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`<br>
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)<br>
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+`<br>
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`<br>
Expected: Similar to previous.

1. Test case: `filter g/A`<br>
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)<br>
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`<br>
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`<br>
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)<br>
Expected: Nothing happens to the current list. Error details shown in the status message.
31 changes: 19 additions & 12 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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`

Expand Down Expand Up @@ -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`

Expand Down Expand Up @@ -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.

<div markdown="span" class="alert alert-primary">:bulb: **Note:**
<div markdown="span" class="alert alert-info">:information_source: **Note:**
Filtering will always occur with the whole address book, regardless of what the user sees on the student list.
</div>

Expand All @@ -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)
Expand Down Expand Up @@ -214,6 +217,10 @@ Enter [list](#listing-all-students--list) to return back to the student list.

Format syntax and more information below.

<div markdown="block" class="alert alert-info">: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.)
</div>

Format: `history [INDEX]`

* Upon entering `history` (i.e. leaving whitespace / not entering any index):
Expand All @@ -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.)
Expand All @@ -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)


Expand Down Expand Up @@ -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]…​` <br> e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague`
**Clear** | `clear`
Expand Down
1 change: 0 additions & 1 deletion docs/diagrams/FilterSequenceDiagram-Logic.puml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ FilterCommand --> LogicManager : commandResult
deactivate FilterCommand
FilterCommand -[hidden]-> LogicManager : commandResult
destroy FilterCommand
destroy GradeSubjectFilterPredicate

[<--LogicManager
deactivate LogicManager
Expand Down
Binary file modified docs/images/FilterSequenceDiagram-Logic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b92629

Please sign in to comment.