Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete-s command to UG #49

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Tutor Connect
# Tutor Connect
[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S1-CS2103T-T17-3/tp/actions)
[![codecov](https://codecov.io/gh/AY2324S1-CS2103T-T17-3/tp/graph/badge.svg?token=CY67NSXKQZ)](https://codecov.io/gh/AY2324S1-CS2103T-T17-3/tp)

Expand Down Expand Up @@ -31,12 +31,12 @@ To verify, perform the following steps:

3. Double click the jar file to launch the application.

> If you are a **Mac** user, you may encounter a warning that says the jar file cannot be opened because it is from an unidentified developer.
> If you are a **Mac** user, you may encounter a warning that says the jar file cannot be opened because it is from an unidentified developer.
> To continue:
>
> i. **Right click** on the jar file and select `Open With > JavaLauncher (default)`.
>
> ii. Press **Open** when prompted.

## Acknowledgements
This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org).
This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org).
20 changes: 10 additions & 10 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* 3a1. TutorConnect shows an error message.

Use case resumes at step 2.

* 3b. The schedule parameters is invalid.

* 3b1. TutorConnect shows an error message.
Expand Down Expand Up @@ -430,7 +430,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
* 3a1. TutorConnect shows an error message.

Use case resumes at step 2.

* 3b. The tutor information parameters is invalid.

* 3b1. TutorConnect shows an error message.
Expand Down Expand Up @@ -552,21 +552,21 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

1. Should work on any _mainstream OS_ as long as it has Java `11` installed.
2. Should be able to hold up to 1000 persons 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 work without requiring an installer
5. _GUI_ should work well for standard screen resolutions 1920x1080 and higher, and, for screen scales 100% and 125%.
6. _GUI_ should be usable for resolutions 1280x720 and higher, and, for screen scales 150%.
7. Should not require the user to have an internet connection to use.
8. Should be a single-user application.
9. Should persistently save data in a human-readable text file between sessions.
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 work without requiring an installer
5. _GUI_ should work well for standard screen resolutions 1920x1080 and higher, and, for screen scales 100% and 125%.
6. _GUI_ should be usable for resolutions 1280x720 and higher, and, for screen scales 150%.
7. Should not require the user to have an internet connection to use.
8. Should be a single-user application.
9. Should persistently save data in a human-readable text file between sessions.
10. Should be able to transfer the data file to another device with no loss of data.

*{More to be added}*

### Glossary

* **Mainstream OS**: Windows, Linux, Unix, OS-X
* **Use case**: A description of a set of sequences of actions, including variants, that a system performs to yield an observable result of value to an actor
* **Use case**: A description of a set of sequences of actions, including variants, that a system performs to yield an observable result of value to an actor
* **GUI**: Graphical user interface

--------------------------------------------------------------------------------------------------------------------
Expand Down
144 changes: 82 additions & 62 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Here’s an overview of what you can do with Tutor Connect:
On top of these functionalities, we believe that tuition centre management must be efficient. Therefore, Tutor Connect is **optimised for users who can type fast** and utilise the Command Line Interface (CLI) to complete tasks using the keyboard faster than using the mouse.

* Table of Contents
{:toc}
{:toc}
saltedfishxx marked this conversation as resolved.
Show resolved Hide resolved

--------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -50,11 +50,11 @@ On top of these functionalities, we believe that tuition centre management must
## Quick Start

1. Ensure you have Java `11` installed in your Computer. To verify, perform the following steps:
1. Open a terminal. Refer to the following guides on how:
1. [MacOS](https://support.apple.com/en-sg/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac#:~:text=Terminal%20for%20me-,Open%20Terminal,%2C%20then%20double%2Dclick%20Terminal)
2. [Windows](https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/#:~:text=anywhere%20you%20like.-,Open%20Command%20Prompt%20from%20the%20Run%20Box,open%20an%20administrator%20Command%20Prompt)
2. Type `java -version` and press Enter.
3. If it says a version other than 11 or `command not found`, please install Java 11 by following this [guide](https://www.java.com/en/download/help/download_options.html).
1. Open a terminal. Refer to the following guides on how:
1. [MacOS](https://support.apple.com/en-sg/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac#:~:text=Terminal%20for%20me-,Open%20Terminal,%2C%20then%20double%2Dclick%20Terminal)
2. [Windows](https://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/#:~:text=anywhere%20you%20like.-,Open%20Command%20Prompt%20from%20the%20Run%20Box,open%20an%20administrator%20Command%20Prompt)
2. Type `java -version` and press Enter.
3. If it says a version other than 11 or `command not found`, please install Java 11 by following this [guide](https://www.java.com/en/download/help/download_options.html).

2. Download the latest jar file (tutorconnect.jar) from our [Github Releases](https://github.com/AY2324S1-CS2103T-T17-3/tp/releases).

Expand All @@ -63,14 +63,14 @@ On top of these functionalities, we believe that tuition centre management must
4. Double-click the jar file to launch the application.

<div markdown="block" class="alert alert-info">
**:information_source: Mac Users**<br>
If you are a Mac user, you may encounter a warning that says
the jar file cannot be opened because it is from an unidentified developer. To continue:
1. Right-click on the jar file and select `Open With > JavaLauncher (default)`
2. Press Open when prompted

**:information_source: Mac Users**<br>

If you are a Mac user, you may encounter a warning that says
the jar file cannot be opened because it is from an unidentified developer. To continue:

1. Right-click on the jar file and select `Open With > JavaLauncher (default)`
2. Press Open when prompted

</div>

Expand All @@ -85,17 +85,17 @@ On top of these functionalities, we believe that tuition centre management must
**:information_source: Command Format:**<br>

* Words in `UPPER_CASE` are the parameters to be supplied by the user.<br>
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
* Items in square brackets are optional.<br>
e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
* Items with `…`​ after them can be used multiple times including zero times.<br>
e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
* Parameters can be in any order.<br>
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`)
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`)
will be ignored.<br>
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple
lines as space characters surrounding line-breaks may be omitted when copied over to the application.

</div>
Expand All @@ -113,19 +113,19 @@ Example:
* `add-t n/Betsy Crowe p/91234567 e/[email protected]`

Acceptable values for each parameter:
* `NAME`: Only string input accepted
* `PHONE`: NUMBER Only numerical input
* `NAME`: Only string input accepted
* `PHONE`: NUMBER Only numerical input
* `EMAIL`: Only valid email addresses

Expected output:
* `New tutor John Doe 98765432 [email protected] has been added.`

Error messages:
* `Missing parameter: n/`: The tag n/ is missing or tutor’s name is missing.
* `Missing parameter: p/`: The tag p/ is missing or tutor’s phone number is missing.
* `Missing parameter: e/`: The tag e/ is missing or tutor’s email is missing.
* `Wrong input: n/`: The name entered is not a valid string.
* `Wrong input: p/`: The phone number entered does not consist of numbers only.
* `Missing parameter: n/`: The tag n/ is missing or tutor’s name is missing.
* `Missing parameter: p/`: The tag p/ is missing or tutor’s phone number is missing.
* `Missing parameter: e/`: The tag e/ is missing or tutor’s email is missing.
* `Wrong input: n/`: The name entered is not a valid string.
* `Wrong input: p/`: The phone number entered does not consist of numbers only.
* `Wrong input: e/`: The email entered is invalid.

### Listing all tutors: `list-t`
Expand All @@ -143,14 +143,37 @@ Displays a list of all tutors in the address book in a table format.
* No acceptable values as list-t has no parameters

**Expected Output**:
* Displays a table of tutors with columns for Name, Phone Number, and Email like
* Displays a table of tutors with columns for Name, Phone Number, and Email like
the [image](#listing-all-tutors--list-t) above
* If there are no tutors in the address book, displays a message telling the user
to add a tutor with add-t: `There are no tutors in the address book. Please use /add-t to add a tutor.`

**Error messages**:
* No error messages as this command ignores extra parameters.

### Deleting a tutor: `delete-t`

Deletes a tutor in the address book based on their index number in the table.

![delete tutor](images/deleteTutor.png)

**Format**: `delete-t TUTOR_INDEX`

**Examples**:
* `delete-t 5` deletes the tutor that is indexed as 5 in the address book.
* `list` followed by `delete-t 2` deletes the 2nd person in the address book.

**Acceptable values for each parameter**:
* `TUTOR_INDEX`: Only accepts numerical value

**Expected output**:
* `Tutor has been deleted: Alex Yeoh; Phone: 87438807;
Email: [email protected]; Address: Blk 30 Geylang Street 29, #06-40`

**Error messages**:
* `Index number given is out of range`: Given index is out of range.
* `Invalid parameter given`: Parameter given is not a numerical value.

### Adding a schedule: `add-s`

Adds a schedule to a specified tutor.
Expand All @@ -169,17 +192,17 @@ Adds a schedule to a specified tutor.
* `END_TIME`: Only datetime in `yyyy-MM-ddTHH:mm:ss` format is accepted

<div markdown="block" class="alert alert-info">
**:information_source: Information**<br>

**:information_source: Information**<br>

* `yyyy` represents the **year** (e.g., 2023).
* `MM` represents the **month** with a leading zero (e.g., 09 for September, 10 for October).
* `dd` represents the **day** of the month with a leading zero (e.g., 03, 15).
* `T` is a **separator** indicating the start of the time portion.
* `HH` represents the **hour** in **24-hour format** with a leading zero (e.g., 09 for 9 AM, 21 for 9 PM).
* `mm` represents the **minutes** with a leading zero (e.g., 05).
* `ss` represents the **seconds** with a leading zero (e.g., 05).

</div>

**Expected output**:
Expand All @@ -194,33 +217,30 @@ Adds a schedule to a specified tutor.
* `Wrong input: s/`: The start time entered is not in datetime format.
* `Wrong input: e/`: The end time entered is not in datetime format..

### Deleting a tutor: `delete-t`
### Deleting a schedule: `delete-s`

Deletes a tutor in the address book based on their index number in the table.
Deletes a schedule in the address book based on their index number in the table of schedules listed.

![delete tutor](images/deleteTutor.png)
![delete schedule](images/deleteSchedule.png)

**Format**: `delete-t TUTOR_INDEX`
**Format:** `delete-s SCHEDULE_INDEX`

**Examples**:
* `delete-t 5` deletes the tutor that is indexed as 5 in the address book.
* `list` followed by `delete-t 2` deletes the 2nd person in the address book.
**Example:**
* `delele-s 5` deletes the schedule that is indexed as 5 in the schedule list.
saltedfishxx marked this conversation as resolved.
Show resolved Hide resolved
* `list` followed by `delete-s 2` deletes the 2nd schedule in the schedule list.

**Acceptable values for each parameter**:
* `TUTOR_INDEX`: Only accepts numerical value
**Acceptable values for each parameter:**
* `SCHEDULE_INDEX`: NUMBER Only numerical input that ranges from 1 to the last schedule shown in the list of schedules.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should omit the NUMBER

SCHEDULE_INDEX: Only numerical input that ranges from 1 to the last schedule shown in the list of schedules.


**Expected output**:
* `Tutor has been deleted: Alex Yeoh; Phone: 87438807;
Email: [email protected]; Address: Blk 30 Geylang Street 29, #06-40`
**Expected output:**
* `Schedule has been deleted: Tutor: John Doe; Start date: Sep 15, 2023 09:00; End date: Sep 15, 2023 11:00;`

**Error messages**:
**Error messages:**
* `Index number given is out of range`: Given index is out of range.
* `Invalid parameter given`: Parameter given is not a numerical value.


* `Invalid value in parameter SCHEDULE_INDEX`: Parameter given is not a numerical value.
* `Missing parameter SCHEDULE_INDEX`: A numerical value is not provided when calling the command `delete-s`.


_Details coming soon ..._
_More details coming soon ..._

--------------------------------------------------------------------------------------------------------------------

Expand All @@ -238,14 +258,14 @@ _Details coming soon ..._
--------------------------------------------------------------------------------------------------------------------

## Command summary
saltedfishxx marked this conversation as resolved.
Show resolved Hide resolved

| Action | Format, Examples |
|------------------|-----------------------------------------------------------------------------------------------------------------------------|
| **Add Tutor** | `add-t n/NAME p/PHONE NUMBER e/EMAIL` <br> e.g., `add-t n/John Doe p/98765432 e/[email protected]` |
| **Add Schedule** | `add-s ti/TUTOR_INDEX s/START_TIME e/END_TIME` <br> e.g., `add-s ti/1 s/2023-09-15T09:00:00 e/2023-09-15T11:00:00` |
| **Clear** | `clear` |
| **Delete Tutor** | `delete-t TUTOR_INDEX`<br> e.g., `delete-t 3` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]` |
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` |
| **List Tutor** | `list-t` |
| **Help** | `help` |
| Action | Format, Examples |
|---------------------|-----------------------------------------------------------------------------------------------------------------------------|
| **Add Tutor** | `add-t n/NAME p/PHONE NUMBER e/EMAIL` <br> e.g., `add-t n/John Doe p/98765432 e/[email protected]` |
| **List Tutor** | `list-t` |
| **Delete Tutor** | `delete-t TUTOR_INDEX`<br> e.g., `delete-t 3` |
| **Add Schedule** | `add-s ti/TUTOR_INDEX s/START_TIME e/END_TIME` <br> e.g., `add-s ti/1 s/2023-09-15T09:00:00 e/2023-09-15T11:00:00` |
| **List Schedule** | `list-s` |
| **Delete Schedule** | `delete-s INDEX_NO`<br> e.g., `delete-s 3` |
| **Clear** | `clear` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`<br> e.g.,`edit 2 n/James Lee e/[email protected]` |
| **Find** | `find KEYWORD [MORE_KEYWORDS]`<br> e.g., `find James Jake` |
Binary file added docs/images/deleteSchedule.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading