Skip to content

Commit

Permalink
Make changes according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
nananakx-x committed Nov 2, 2023
1 parent 4bf89da commit 6ec8475
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 4 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ Given below is an example usage scenario and how the add mechanism behaves at ea

Step 1. The user enters the `add` command with relevant details for the new fosterer. The `AddCommandParser` is invoked to parse the user's input.

Step 2. The `AddCommandParser` processes the user's input and verifies the presence of mandatory fields inputted in the correct format. If this check fails, the system will generate a specific error message indicating which field format is invalid. For example, if the email format is incorrect, the system will report that the email input is invalid. The error message will be displayed to the user, providing clear feedback about the issue and the specific constraints that are not met.
Step 2. The `AddCommandParser` processes the user's input and verifies the presence of mandatory fields inputted in the correct format.<br/>
If this check fails, the system will generate a specific error message indicating which field format is invalid.<br/>
For example, if the email format is incorrect, the system will report that the email input is invalid. The error message will be displayed to the user, providing clear feedback about the issue and the specific constraints that are not met.

Step 3. If all mandatory fields are present with the valid format, the new person is created using the `Person` class. The person's details, including their name, phone, email, address, housing, availability, animal name, animal type, and tags, are recorded, and the Person class also ensures that there is no conflicting data.
Step 3. If all mandatory fields are present with the valid format, the new person is created using the `Person` class. The person's details, including their name, phone, email, address, housing, availability, animal name, animal type, and tags, are recorded, and the Person class also ensures that there is no conflicting data.<br/>
If this check fails, the system will generate a specific error message indicating which field is invalid, and how can it be resolved.

Step 4. The `Person` is then passed to the new `AddCommand` created, which adds the person to the address book, ensuring that it is not a duplicate of an existing entry. This check is performed in the `execute` method of the `AddCommand`.
Expand Down
19 changes: 9 additions & 10 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ These are symbols we will be using to highlight certain information to you.

--------------------------------------------------------------------------------------------------------------------
## User Interface (UI)
There are mainly two different screens that you may face when using Foster Family.
These are the two different screens you will be interacting with in Foster Family.

### The Main Window
![Ui](images/Ui.png)
Expand Down Expand Up @@ -133,8 +133,8 @@ If you press Esc key, the exit is cancelled and you can continue working on the
The example above is the result of pressing the Esc key after you are warned.


To learn more about **adding a new fosterer through the profile page**, refer to a section [Adding a fosterer through the profile page: add](#adding-a-fosterer-through-the-profile-page-add). <br/>
To learn more about **editing a fosterer through the profile page**, refer to a section about [Editing a fosterer's detail through the profile page: edit](#editing-a-fosterers-detail-through-the-profile-page-edit).
To learn more about **adding a new fosterer through the profile page**, refer to the section [Adding a fosterer through the profile page: add](#adding-a-fosterer-through-the-profile-page-add). <br/>
To learn more about **editing a fosterer through the profile page**, refer to the section [Editing a fosterer's detail through the profile page: edit](#editing-a-fosterers-detail-through-the-profile-page-edit).


## Features
Expand Down Expand Up @@ -240,8 +240,7 @@ Format: `add`

**:information_source: Notes about the command:**<br>

* Valid cases of a fosterer entry in the section [Adding a fosterer through the main window: add](#adding-a-fosterer-through-the-main-window-add) are still applied in this alternative way to add a fosterer.

* The restrictions imposed on what makes a valid fosterer, as explained in the section [Adding a fosterer through the main window: add](#adding-a-fosterer-through-the-main-window-add), still applies in this alternative way of adding a fosterer.
</div>

![Profile](images/screenshots/ProfilePage.png)
Expand Down Expand Up @@ -539,22 +538,22 @@ Undoes the previous command, given that the previous command successfully execut

Format: `undo`

![Undo](images/screenshots/Undo.png)

<div markdown="block" class="alert alert-info">

**:information_source: Notes about the command:**<br>

* The `undo` command can only be executed **once** at a time, and it will undo the last successful command. When the `undo` command is executed consecutively more than once, an error message will be shown:
![Undo](images/screenshots/UndoError.png)
* Provided that the previous command was a successful `add`, `delete`, or `edit`, the `undo` command will be executed successfully.
![Undo](images/screenshots/Undo.png)

</div>

### Clearing all entries : `reset`, followed by `reset confirm`

Clears all entries from the address book.

Format: `reset` and `reset confirm`
Format: `reset`, followed by `reset confirm`

<div markdown="block" class="alert alert-info">

Expand All @@ -574,9 +573,9 @@ Exits the program.

Format: `exit`

<div markdown="block" class="alert alert-primary">
<div markdown="block" class="alert alert-info">

**:bulb: Tip:**<br>
**:information_source: Notes about the command:**<br>

* On the profile page, entering <code>exit</code> leads you out of the page back to the main window.
* On the profile page, attempting to <code>exit</code> without saving changes with <code>save</code> prompts a warning message (refer to [User Interface: The Profile Page: Exiting the profile page](#exiting-the-profile-page)).
Expand Down

0 comments on commit 6ec8475

Please sign in to comment.