diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 5123a969436..2eedf3dee56 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -4,24 +4,51 @@ pageNav: 3 --- -# AB-3 User Guide +# TutorTrack User Guide -AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps. +TutorTrack is a **desktop app for tutors to manage their students and scheduled classes, optimized for use via a Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, TutorTrack can get your contact management tasks done faster than traditional GUI apps. +### What is in this user guide +- Quick start +- Features + - Help : Viewing help + - Add : Adding a student + - List : Listing all students + - Edit : Editing a student + - Find : Finding a student + - Delete : Deleting a student + - Clear : Clearing all entries + - Exit : Exiting the program + - Saving data + - Editing the data file + - Archiving data files +- FAQs +- Known issues +- Command summary + +### How to use this guide +**Navigation** : Use the table of contents to find the section you are looking for.
+ +**Features** : Each feature and what they do are listed with their commands for you to understand what our app can do.
+ +**Examples** : Under each feature, examples of commands and ui are given for you to better understand how the app should work.
+ +**Getting started** : For first time users, refer to the "Quick start" segment to start up the app for the first time + -------------------------------------------------------------------------------------------------------------------- ## Quick start 1. Ensure you have Java `11` or above installed in your Computer. -1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). +1. Download the latest `TutorTrack.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). 1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar addressbook.jar` command to run the application.
+1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar TutorTrack.jar` command to run the application.
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
![Ui](images/Ui.png) @@ -52,10 +79,10 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo 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.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. + e.g `n/NAME [l/LESSON]` can be used as `n/John Doe l/Physics|2024-05-01|09:00` or as `n/John Doe`. * Items with `…`​ after them can be used multiple times including zero times.
- e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. + e.g. `[l/LESSON]…​` can be used as ` ` (i.e. 0 times), `l/Physics|2024-05-01|09:00`, `l/Maths|2024-05-03|10:30 l/Biology|2024-05-05|11:00` etc. * Parameters can be in any order.
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. @@ -79,16 +106,16 @@ Format: `help` Adds a person to the address book. -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` +Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS s/SUBJECT [l/LESSON]…​` -**Tip:** A person can have any number of tags (including 0) +**Tip:** A person can have any number of lessons (including 0) Examples: -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` +* `add n/John Doe p/84920491 e/rena@gmail.com a/RVRC s/Physics` +![img.png](img.png) ### Listing all persons : `list` @@ -96,22 +123,25 @@ Shows a list of all persons in the address book. Format: `list` +What you should see: +![img_1.png](img_1.png) + ### Editing a person : `edit` Edits an existing person in the address book. -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` +Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [l/LESSON]…​` * Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -* You can remove all the person’s tags by typing `t/` without - specifying any tags after it. +* When editing lessons, the existing lessons of the person will be removed i.e adding of lessons is not cumulative. +* You can remove all the person’s lessons by typing `t/` without + specifying any lessons after it. Examples: -* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. -* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. +* `edit 1 a/Yale-nus` Edits the address of the first person to be `Cinnamon College` and clears all existing lessons. +![img_2.png](img_2.png) ### Locating persons by name: `find` @@ -127,9 +157,9 @@ Format: `find KEYWORD [MORE_KEYWORDS]` e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` Examples: -* `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +* `find Sherlock Jessica` returns `Sherlock` `Jessica`
+![img_3.png](img_3.png) + ### Deleting a person : `delete` @@ -142,12 +172,14 @@ Format: `delete INDEX` * The index **must be a positive integer** 1, 2, 3, …​ Examples: -* `list` followed by `delete 2` deletes the 2nd person in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +* `list` followed by `delete 2` deletes the 2nd student in TutorTrack. +![img_4.png](img_4.png) +* `find Jessica Jane` followed by `delete 1` deletes the 1st person in the results of the `find` command. +* ![img_5.png](img_5.png) ### Clearing all entries : `clear` -Clears all entries from the address book. +Clears all entries from TutorTrack. Format: `clear` @@ -159,11 +191,11 @@ Format: `exit` ### Saving the data -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +TutorTrack data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. ### Editing the data file -AddressBook data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. +TutorTrack data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. @@ -195,10 +227,10 @@ _Details coming soon ..._ 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` +**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS s/SUBJECT [l/LESSON]…​`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 s/Maths l/Maths|2024-05-03|10:30` **Clear** | `clear` **Delete** | `delete INDEX`
e.g., `delete 3` -**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` +**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [l/LESSONS]…​`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` **Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` **List** | `list` **Help** | `help` diff --git a/docs/img.png b/docs/img.png new file mode 100644 index 00000000000..39aa8aeecca Binary files /dev/null and b/docs/img.png differ diff --git a/docs/img_1.png b/docs/img_1.png new file mode 100644 index 00000000000..fbef4777d71 Binary files /dev/null and b/docs/img_1.png differ diff --git a/docs/img_2.png b/docs/img_2.png new file mode 100644 index 00000000000..fa9db9b7b76 Binary files /dev/null and b/docs/img_2.png differ diff --git a/docs/img_3.png b/docs/img_3.png new file mode 100644 index 00000000000..4ca5c720d66 Binary files /dev/null and b/docs/img_3.png differ diff --git a/docs/img_4.png b/docs/img_4.png new file mode 100644 index 00000000000..c50bd83b48e Binary files /dev/null and b/docs/img_4.png differ diff --git a/docs/img_5.png b/docs/img_5.png new file mode 100644 index 00000000000..dd3967d4343 Binary files /dev/null and b/docs/img_5.png differ diff --git a/src/main/java/seedu/address/model/student/Lesson.java b/src/main/java/seedu/address/model/student/Lesson.java index 886b1a5b7a5..0393c676aa6 100644 --- a/src/main/java/seedu/address/model/student/Lesson.java +++ b/src/main/java/seedu/address/model/student/Lesson.java @@ -163,6 +163,6 @@ public int hashCode() { * Format state as text for viewing. */ public String toString() { - return '[' + value + ']'; + return this.subject + " " + this.date.toString() + " " + this.time; } } diff --git a/src/main/java/seedu/address/ui/StudentCard.java b/src/main/java/seedu/address/ui/StudentCard.java index 6c5eb47735e..4512d018402 100644 --- a/src/main/java/seedu/address/ui/StudentCard.java +++ b/src/main/java/seedu/address/ui/StudentCard.java @@ -60,7 +60,7 @@ public StudentCard(Student student, int displayedIndex) { subject.setText(student.getSubject().value); remark.setText(student.getRemark().value); student.getLessons().stream() - .sorted(Comparator.comparing(Lesson::getLessonValue)) - .forEach(lesson -> lessons.getChildren().add(new Label(lesson.getLessonValue()))); + .sorted(Comparator.comparing(Lesson::getLessonValue)).filter(lesson -> lesson.getLessonStatus() == 0) + .forEach(lesson -> lessons.getChildren().add(new Label(lesson.toString()))); } } diff --git a/src/test/java/seedu/address/model/student/LessonTest.java b/src/test/java/seedu/address/model/student/LessonTest.java index c36323cf278..b9b424afede 100644 --- a/src/test/java/seedu/address/model/student/LessonTest.java +++ b/src/test/java/seedu/address/model/student/LessonTest.java @@ -65,4 +65,19 @@ public void equals() { String differentLesson = "Science"; assertFalse(lesson.equals(new Lesson(differentLesson, validDate, validTime))); } + + @Test + public void getLessonStatusIsValid() { + Lesson lesson1 = new Lesson("Math|01-01-2023|09:00|0"); + assertEquals(lesson1.getLessonStatus(), 0); + + Lesson lesson2 = new Lesson("Math|01-01-2023|09:00|1"); + assertEquals(lesson2.getLessonStatus(), 1); + } + + @Test + public void toStringTest() { + Lesson lesson = new Lesson("Math|01-01-2023|09:00|0"); + assertEquals(lesson.toString(), "Math 2023-01-01 09:00"); + } }