diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 6ff220b519..9179fbef4b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -6,7 +6,7 @@ jobs: build: strategy: matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] + platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: @@ -43,3 +43,4 @@ jobs: uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + diff --git a/.gitignore b/.gitignore index 284c4ca7cd..6518561121 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,9 @@ src/main/resources/docs/ /out/ /*.iml +# VSCode files +/.vscode/ + # Storage/log files /data/ /config.json diff --git a/README.md b/README.md index 13f5c77403..02b03739d9 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,9 @@ -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) - +[![CI Status](https://github.com/AY2324S2-CS2103T-W12-2/tp/actions/workflows/gradle.yml/badge.svg)](https://github.com/AY2324S2-CS2103T-W12-2/tp/actions) ![Ui](docs/images/Ui.png) -* This is **a sample project for Software Engineering (SE) students**.
- Example usages: - * as a starting point of a course project (as opposed to writing everything from scratch) - * as a case study -* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details. - * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big. - * It comes with a **reasonable level of user and developer documentation**. -* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...). -* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**. -* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info. +# ModContact + +This app helps students find more-knowledge-others(MKOs) that they already know, and have the contacts for, by filtering their contacts by modules. ModContact allows for discovery of new MKOs (assuming this does not violate the constraints for the evolve direction). + +# Acknowlegement +This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org) diff --git a/build.gradle b/build.gradle index a2951cc709..9a21fdccd3 100644 --- a/build.gradle +++ b/build.gradle @@ -69,4 +69,8 @@ shadowJar { archiveFileName = 'addressbook.jar' } +run { + enableAssertions = true +} + defaultTasks 'clean', 'test' diff --git a/docs/AboutUs.md b/docs/AboutUs.md index 1c9514e966..1a9436cda8 100644 --- a/docs/AboutUs.md +++ b/docs/AboutUs.md @@ -5,55 +5,47 @@ title: About Us We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg). -You can reach us at the email `seer[at]comp.nus.edu.sg` +You can reach us at the email `y.p[at]u.nus.edu` ## Project team -### John Doe +### Bajaj Aditya - + -[[homepage](http://www.comp.nus.edu.sg/~damithch)] -[[github](https://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](https://github.com/AdityaB4)] +[[portfolio](team/adityab4.md)] -* Role: Project Advisor - -### Jane Doe - - - -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] - -* Role: Team Lead -* Responsibilities: UI +* Role: Developer +* Responsibilites: Code Writer and Scheduling -### Johnny Doe +### Brandon Lau - + -[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)] +[[github](http://github.com/blaukc)] +[[portfolio](team/blaukc.md)] * Role: Developer -* Responsibilities: Data +* Responsibilities: Code Quality -### Jean Doe +### Yadunand Prem - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[homepage](https://gitea.ts.yadunut.com)] +[[github](http://github.com/yadunut)] +[[portfolio](team/yadunut.md)] * Role: Developer -* Responsibilities: Dev Ops + Threading +* Responsibilities: Code Writer -### James Doe +### Taufiq Mohammed - + -[[github](http://github.com/johndoe)] -[[portfolio](team/johndoe.md)] +[[github](http://github.com/taufiq)] +[[portfolio](team/taufiq.md)] * Role: Developer -* Responsibilities: UI +* Responsibilities: Code Writer diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 1b56bb5d31..92a6b8471f 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -2,23 +2,28 @@ layout: page title: Developer Guide --- -* Table of Contents +# Table of Contents +* TOC {:toc} -------------------------------------------------------------------------------------------------------------------- + ## **Acknowledgements** -* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} +* The development team enabled GitHub Copilot code completions when working on code that followed similar structure to the rest of the project, such that learning was not hindered and productivity was boosted. +* GitHub Copilot inline code generation was also used to generate JavaDoc comments, which were then customised to our desired level of description detail. -------------------------------------------------------------------------------------------------------------------- + ## **Setting up, getting started** Refer to the guide [_Setting up and getting started_](SettingUp.md). -------------------------------------------------------------------------------------------------------------------- + ## **Design**
@@ -36,7 +41,7 @@ Given below is a quick overview of main components and how they interact with ea **Main components of the architecture** -**`Main`** (consisting of classes [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java)) is in charge of the app launch and shut down. +**`Main`** (consisting of classes [`Main`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/MainApp.java)) is in charge of the app launch and shut down. * At app launch, it initializes the other components in the correct sequence, and connects them up with each other. * At shut down, it shuts down the other components and invokes cleanup methods where necessary. @@ -68,24 +73,24 @@ The sections below give more details of each component. ### UI component -The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java) +The **API** of this component is specified in [`Ui.java`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/ui/Ui.java) ![Structure of the UI Component](images/UiClassDiagram.png) -The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI. +The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `StudentListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI. -The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml) +The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/resources/view/MainWindow.fxml) The `UI` component, * executes user commands using the `Logic` component. * listens for changes to `Model` data so that the UI can be updated with the modified data. * keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands. -* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`. +* depends on some classes in the `Model` component, as it displays `Student` object residing in the `Model`. ### Logic component -**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java) +**API** : [`Logic.java`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/logic/Logic.java) Here's a (partial) class diagram of the `Logic` component: @@ -102,7 +107,7 @@ How the `Logic` component works: 1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command. 1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which is executed by the `LogicManager`. -1. The command can communicate with the `Model` when it is executed (e.g. to delete a person).
+1. The command can communicate with the `Model` when it is executed (e.g. to delete a student).
Note that although this is shown as a single step in the diagram above (for simplicity), in the code it can take several interactions (between the command object and the `Model`) to achieve. 1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`. @@ -115,19 +120,19 @@ How the parsing works: * All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing. ### Model component -**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java) +**API** : [`Model.java`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/model/Model.java) The `Model` component, -* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object). -* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. +* stores the address book data i.e., all `Student` objects (which are contained in a `UniqueStudentList` object). +* stores the currently 'selected' `Student` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. * stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects. * does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components) -
:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.
+
:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Student` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Student` needing their own `Tag` objects.
@@ -136,7 +141,7 @@ The `Model` component, ### Storage component -**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java) +**API** : [`Storage.java`](https://github.com/AY2324S2-CS2103T-W12-2/tp/tree/master/src/main/java/seedu/address/storage/Storage.java) @@ -150,11 +155,69 @@ The `Storage` component, Classes used by multiple components are in the `seedu.addressbook.commons` package. -------------------------------------------------------------------------------------------------------------------- - + ## **Implementation** This section describes some noteworthy details on how certain features are implemented. +### Finding free time between friends based on allocated module timings + +Finding free time between students is done through `find_free_time d/Wed st/1200 et/1400`. + +`LogicManager` first calls `AddressBookParser` which then runs `parse_command` and then calls +`FindFreeTimeCommandParser` which then parses the arguments, validates them, and then creates +a new `FindFreeTimeCommand` instance. The arguments passed in is then used within a newly `IsFreePredicate` +instance within the `FindFreeTimeCommand` instance, and the `LogicManager` then executes it. + +This then calls the existing `updateFilteredStudentList`with the `IsFreePredicate` within the `Model` instance. + +The following is the sequence diagram for this example. + + + +#### Design Considerations + +Well, it was rather straightforward to implement this design because it has extreme similarities to the `FindCommand` +that already existed within the AB3. Only tough parts were the filtering of conditions to ensure the +time range stated doesn't overlap with the module timings of the students within the list. + +* **Alternative 1 (current choice):** Re-use code from `FindCommand` sequence. + * Pros: Easy to implement. + * Cons: Had to reconfigure the code to match our usecase. + +In short, this was the straightforward options with no backlash as it was a insanely easy command to create +considering that existing groundwork has been laid. No issues has been faced with the implementation of the design +other than rough hiccups (i.e allowing end time to be earlier than start time) + +### Adding a ModuleTiming to a Student + +Adding a class to a student in ModContacts is done by the command `add_timing i/1 m/CS2103T d/Mon st/0800 et/1200` + +The entry point for this command is when the `LogicManager` parses the command, gets a `AddStudentModuleCommand`, +and then executes it. + +`AddStudentModuleCommand` performs some validations, then adds the `ModuleTiming` to the designated +`Student` in the `FilteredStudentList` via `Model#addModuleTimingToStudent`. + +The following is the sequence diagram for this example. + + + +### Deleting a ModuleTiming from a Student + +Deleting a class from a student in ModContacts is done using the command `delete_timing i/1 m/CS2103T d/Mon st/0800 et/1200` + +The entry point for this command is when the `LogicManager` parses the command, gets a `DeleteStudentModuleTimingCommand`, +and then executes it. + +`DeleteStudentModuleTimingCommand` performs validations for valid Timings, and whether a student takes the module; then deletes the `ModuleTiming` from the designated +`Student` in the `FilteredStudentList` via `Model#deleteModuleTimingFromStudent`. + +The following is the sequence diagram for this example. + + + + ### \[Proposed\] Undo/redo feature #### Proposed Implementation @@ -173,11 +236,11 @@ Step 1. The user launches the application for the first time. The `VersionedAddr ![UndoRedoState0](images/UndoRedoState0.png) -Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. +Step 2. The user executes `delete 5` command to delete the 5th student in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. ![UndoRedoState1](images/UndoRedoState1.png) -Step 3. The user executes `add n/David …​` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. +Step 3. The user executes `add n/David …​` to add a new student. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. ![UndoRedoState2](images/UndoRedoState2.png) @@ -185,7 +248,7 @@ Step 3. The user executes `add n/David …​` to add a new person. The `add` co
-Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. +Step 4. The user now decides that adding the student was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. ![UndoRedoState3](images/UndoRedoState3.png) @@ -234,7 +297,7 @@ The following activity diagram summarizes what happens when a user executes a ne * **Alternative 2:** Individual command knows how to undo/redo by itself. - * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted). + * Pros: Will use less memory (e.g. for `delete`, just save the student being deleted). * Cons: We must ensure that the implementation of each individual command are correct. _{more aspects and alternatives to be added}_ @@ -243,9 +306,34 @@ _{more aspects and alternatives to be added}_ _{Explain here how the data archiving feature will be implemented}_ +### Handling of Modules +#### Proposed Implementation +ModContacts has a builtin list of all modules from NUS. This list is stored in a JSON file, which is embedded in the jar file. The implementation is facilitated by the `JsonModuleMapStorage`. This implements the `ModuleMapStorage`, an interface which defines functions to retrieve the module map from storage into Memory. + +- `JsonModuleMapStorage#readModuleMap` + +This operation is exposed in Storage as `ReadModuleMap`, which allows the `ModelManager` to populate its `ModuleMap` with data from the embedded file. +With the model manager having the ModuleMap, this can now be accessed by the `Commands` in the `logic` package. + +#### Design Consideration +The design considerations we had to make was on how to store the modules + +There were two ways of storing the modules in the application. +1. Store it within the addressbook.json, where the modules are stored as a list of modules, along-side the addressbook data. +2. Store it as a separate JSON file, and have the application read from it. +Option 1 is easier to implement as it is just extending from the existing addressbook.json file, however, it would be harder to maintain as the addressbook.json file would be cluttered with module information. Option 2 is cleaner, but requires more work to implement. Not only that, any updates to the module list would require a new release of the application. + +We decided to go with Option 2 for ergonomics reasons, as we wanted to keep the addressbook.json file clean and easy to read. Not only that, it prevents the users from accidentally editting the module information. + +### Handling of Student Module Allocation +#### Proposed Implementation +Details of Modules are stored separately in a `JSON` file. The concept of ModContacts requires us to assign module information to students as a way to indicate that the students are taking up those modules. + +As a result, the module code of a module is stored along with the student information instead of the whole module (i.e Module Title, Module Description, etc.). It was done this way to reduce redundancy between information and not to overcomplicate things. If were to include the whole module information within each student, then a change in the details of a mod would have required multiple changes across the students. -------------------------------------------------------------------------------------------------------------------- + ## **Documentation, logging, testing, configuration, dev-ops** * [Documentation guide](Documentation.md) @@ -256,48 +344,76 @@ _{Explain here how the data archiving feature will be implemented}_ -------------------------------------------------------------------------------------------------------------------- + ## **Appendix: Requirements** ### Product scope **Target user profile**: -* has a need to manage a significant number of contacts +* has a need to manage what modules their friends are taking * prefer desktop apps over other types * can type fast * prefers typing to mouse interactions * is reasonably comfortable using CLI apps -**Value proposition**: manage contacts faster than a typical mouse/GUI driven app +**Value proposition**: manage friend's module information faster than a typical mouse/GUI driven app ### User stories Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*` -| Priority | As a …​ | I want to …​ | So that I can…​ | -| -------- | ------------------------------------------ | ------------------------------ | ---------------------------------------------------------------------- | -| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App | -| `* * *` | user | add a new person | | -| `* * *` | user | delete a person | remove entries that I no longer need | -| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list | -| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident | -| `*` | user with many persons in the address book | sort persons by name | locate a person easily | - -*{More to be added}* +| Priority | As a …​ | I want to …​ | So that I can…​ | +| -------- | ------------------ | -------------------------------------------------------- | -------------------------------------------------- | +| `* * *` | student | add my friend's contact information | keep track of my friend's contact information | +| `* * *` | student | delete a friend's contact | remove entries that I no longer need | +| `* * *` | student | add which modules my friend is taking this semester | keep track of who is taking the same modules as me | +| `* * *` | student | delete which modules my friend is taking this semester | keep information relevant | +| `* * *` | student | list my friend's contact details and modules | know who is taking the same module as me | +| `* *` | first-time user | view a guide | understand how to use the app | +| `* *` | student | edit my friend's contact information | keep my friend's contact details up to date | +| `* *` | student | add which tutorials my friend is attending | know when my friends are free | +| `* *` | student | delete which tutorials my friend is taking this semester | keep information relevant | +| `* *` | student | edit my friend's tutorial slots | keep my friend's schedule up to date | +| `* *` | student | search which friends are taking the same module as me | find friends to discuss homework with | +| `* *` | lonely student | search which friends are free at a particular time | find friends to hang out with | +| `* *` | student | purge all module/tutorial data | reset for the next semester | +| `*` | forgetful student | fuzzy search my friend's names | search for friend's whose names I forgot | +| `*` | thoughtful student | save the pronunciation of my friend's names | know the proper way to say their names | +| `*` | student | share my profile with a QR code/email/telegram | share my contact details with my friends | ### Use cases -(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise) +(For all use cases below, the **System** is `ModContacts` and the **Actor** is the `student`, unless specified otherwise) + +**Use case: Create a friend** + +**MSS** + +1. Student requests to add a friend +2. ModContacts adds the friend + + Use case ends. + +**Extensions** + +* 1a. Phone number is invalid. + + * 1a1. ModContacts shows an error message. -**Use case: Delete a person** + Use case resumes at step 1. + +--- + +**Use case: Delete a friend** **MSS** -1. User requests to list persons -2. AddressBook shows a list of persons -3. User requests to delete a specific person in the list -4. AddressBook deletes the person +1. Student requests to list friends +2. ModContacts shows a list of friends +3. Student requests to delete a specific friend in the list +4. ModContacts deletes the friend Use case ends. @@ -309,24 +425,94 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 3a. The given index is invalid. - * 3a1. AddressBook shows an error message. + * 3a1. ModContacts shows an error message. Use case resumes at step 2. -*{More to be added}* +--- -### Non-Functional Requirements +**Use case: Add a module to a friend** -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. -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. +**MSS** + +1. Student requests to list friends +2. ModContacts shows a list of friends and their modules +3. Student requests to add a module to a specific friend in the list +4. ModContacts adds the module to the friend + + Use case ends. -*{More to be added}* +**Extensions** + +* 2a. The list is empty. + + Use case ends. + +* 3a. The given index is invalid. + + * 3a1. ModContacts shows an error message. + + Use case resumes at step 2. + +* 3b. The given module name is invalid. + + * 3b1. ModContacts shows an error message. + + Use case resumes at step 2. + +--- + +**Use case: Delete a module** + +**MSS** + +1. Student requests to list friends +2. ModContacts shows a list of friends and their modules +3. Student requests to delete a module from a specific friend in the list +4. ModContacts deletes the module from the friend + + Use case ends. + +**Extensions** + +* 2a. The list is empty. + + Use case ends. + +* 3a. The given index is invalid. + + * 3a1. ModContacts shows an error message. + + Use case resumes at step 2. + +* 3b. The given module name is invalid. + + * 3b1. ModContacts shows an error message. + + Use case resumes at step 2. + +* 3c. The given module is not found in friend. + + * 3c1. ModContacts shows an error message. + + Use case resumes at step 2. + +--- + +### Non-Functional Requirements + +1. Should work on any [_mainstream OS_](#glossary) as long as it has Java `11` or above installed. +2. Should be able to hold up to 100 students without a noticeable sluggishness in performance for typical usage. +3. All commands should execute within 1000 milliseconds. +4. 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. +5. The user interface should be intuitive enough for users who are not IT-savvy ### Glossary * **Mainstream OS**: Windows, Linux, Unix, MacOS * **Private contact detail**: A contact detail that is not meant to be shared with others +* **Module**: The subject that the student is currently taking +* **Tutorial**: The classes of a particular module, that can be chosen by the student, that is, it can vary from student to student taking the same module. -------------------------------------------------------------------------------------------------------------------- @@ -345,28 +531,31 @@ testers are expected to do more *exploratory* testing. 1. Download the jar file and copy into an empty folder - 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. + 2. Opening the app: + 1. **If you are using Windows:** Simply double-click on `modcontacts.jar` within your file explorer and a GUI similar to what is shown below should appear! + 2. **If you are using MacOS / Linux:** Open a terminal window. Navigate to the folder containing `modcontacts.jar` using the `cd [relative/absolute folder path]` command. Then run `java -jar modcontacts.jar`. + +For a more comprehensive quick start guide, refer to the [quick start section in our User Guide.](UserGuide/#quick-start) -1. Saving window preferences +2. Saving window preferences 1. Resize the window to an optimum size. Move the window to a different location. Close the window. - 1. Re-launch the app by double-clicking the jar file.
+ 2. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained. -1. _{ more test cases …​ }_ -### Deleting a person +### Deleting a student -1. Deleting a person while all persons are being shown +1. Deleting 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: `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. 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. @@ -380,3 +569,22 @@ testers are expected to do more *exploratory* testing. 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ 1. _{ more test cases …​ }_ + +-------------------------------------------------------------------------------------------------------------------- + +## **Appendix: Planned Enhancements** + +Given below are Planned Enhancements that will be implemented in future versions of the app. + + +### `view_email` and `view_address` +The `add` command currently requires the user to enter an email and address, which are not displayed in the application due to lack of relevance. The `view_email` and `view_address` commands would address why this information was included in the `add` command syntax by allowing a user to view the added student's email and address by referring to a particular index. + + +### Supporting text in multiple languages +ModContacts currently supports input in English. This will be extended to more languages in future versions. + +**Note**: Attempting to input text in another language may produce unpredicatble behaviour in the current version of the app, and is to be done at the user's risk. + +### Supporting names with special characters +ModContacts currently supports names without any special characters. This will be extended to support common Singaporean names containing "S/O" or "D/O" in future versions. diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 7abd198421..c2295d1f91 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -3,196 +3,727 @@ layout: page title: User Guide --- -AddressBook Level 3 (AB3) 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, AB3 can get your contact management tasks done faster than traditional GUI apps. +Hello NUS School of Computing (SoC) students! Welcome to the User Guide for **ModContacts**! -* Table of Contents +**TIRED** of constantly needing to remember what your NUS friends are up to? +**ModContacts** is a desktop app for keeping track of your peers and the modules that they take so that you can keep in +contact with them amidst your journey in NUS! + +
+ +# Table of Contents + +- TOC {:toc} --------------------------------------------------------------------------------------------------------------------- +--- + +# About ModContacts + +## Who is ModContacts for? + +ModContacts tailored specifically for: + +1. NUS School of Computing students, +2. people who want to keep in touch with their NUS friends easily, +3. people who desire academic success by utilising their social connections, +4. people quick on the keyboard, tired of moving constantly between the mouse and keyboard + +## What does ModContacts do? + +ModContacts is designed to help School of Computing students: + +- Effortlessly keep track of all their friend's modules and schedules + - Our one-stop solution to keeping track of our friend's timetables! +- Find out common timings when everyone is free to meet + - Say goodbye to painting when2meets! +- Discover who is taking the same module as you + - No more constantly asking: "hey bro, what mods are you doing this sem?" + +## What is the Purpose of this User Guide? + +Some of you are definitely thinking: _What is the point of this User Guide?_ + +The ModContacts User Guide serves as a quick, efficient, all-in-one manual for both new and experienced users. + +### New Users +It is great to see that you're interested in using ModContacts! + +Head to the [Getting Started](#getting-started) section and follow the guide to get ModContacts up and running! + +Then check out the [Tutorial](#tutorial) some [Features](#features), and the handy [Command Summary](#command-summary). + +### Experienced Users + +Head over to the [Command Summary](#command-summary), [FAQ](#faq) or [Troubleshooting](#known-issues) sections. + +## How should I use this guide? + +The guide includes information on how users can effectively navigate the document, clarifies the meaning of icons and formatting used, and provides guidance on understanding features, functions, or commands. +These can be quickly referenced from the [Table of Contents](#table-of-contents). + +## Conventions + +| Convention | Description | +| -------------------- | ----------------------------------------------------------------------- | +| [Link](#conventions) | These are links to sections within the user guide | +| `Command` | Commands are represented with this text | +| :bulb: | These are tips that might be useful during the operation of ModContacts | +| :exclamation: | These are warnings to take note of during the operation of ModContacts | +| `m/FIELD` | These are required [fields](#glossary) in a command | +| `[i/FIELD]` | These are optional [fields](#glossary) in a command | + +--- +
+# Getting Started + +## Prerequisites + +For ModContacts to work, you need to have Java `11` or above installed on your computer! + +Follow this guide for your OS of choice: + +- [Windows](https://docs.oracle.com/en/java/javase/11/install/installation-jdk-microsoft-windows-platforms.html#GUID-A7E27B90-A28D-4237-9383-A58B416071CA) +- [MacOS](https://docs.oracle.com/en/java/javase/11/install/installation-jdk-macos.html#GUID-2FE451B0-9572-4E38-A1A5-568B77B146DE) +- [Linux](https://docs.oracle.com/en/java/javase/11/install/installation-jdk-linux-platforms.html#GUID-737A84E4-2EFF-4D38-8E60-3E29D1B884B8) +
## Quick start -1. Ensure you have Java `11` or above installed in your Computer. +1. Ensure you have Java `11` or above installed in your computer from the [Prerequisites](#prerequisites) Section. + +2. Download the latest `modcontacts.jar` from [here](https://github.com/AY2324S2-CS2103T-W12-2/tp/releases). -1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases). +3. Opening the app: + 1. **If you are using Windows:** Simply double-click on `modcontacts.jar` within your file explorer and a GUI similar to what is shown below should appear! + 2. **If you are using MacOS / Linux:** Open a terminal window. Navigate to the folder containing `modcontacts.jar` using the `cd [relative/absolute folder path]` command. Then run `java -jar modcontacts.jar`. -1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook. +
:bulb: **Tip:** +For MacOS and Linux users: If you are new to using the terminal, [this guide](https://riptutorial.com/terminal/example/26023/basic-navigation-commands) may be useful for navigating to the folder in step 3. +
+ +On First launch, the app should look like this: + + + +
+### Usage + +![Annotated UI](images/AnnotatedUi.png) + +1. Menubar: This is where you will find the `File` and `Help` options. + 1. `File` provides you a menu, which contains an option to exit the app. + 2. `Help` shows you a pop-up, using which you can access the User Guide. +2. [CLI](#glossary) / Input: This is where you enter [commands](#what-is-a-command) to interact with the app. +3. Command output panel: This is where you would see the output of the commmand that you have entered in the CLI. +4. Filtered contact list: This is the main information panel of the app. Here you will see a list of your contacts, that you can filter using commands. + - Filtering the list is done using commands like [`find`](#locating-friends-by-name-find) and [`find_free_time`](#find-friends-who-are-free-to-meet-find_free_time), which change the filtered contact list by reducing the number of contacts displayed. + - After this, when you use other commands like [`edit`](#editing-a-friend--edit), the command inputs are based on the contacts that are currently visible in the filtered contact list. You will learn more about this [in a later section.](#features) +5. Name, Number, Module with timings: These are the details for a particular contact in the filtered contact list. + +### What is a Command? + +A command is what you type into the app to execute your intentions (Adding a `Friend` or a `Module`)! -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.
- A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
- ![Ui](images/Ui.png) +Here are some examples of commands that you'd be using: -1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
- Some example commands you can try: +- `add n/Aditya p/98765432 e/adityab4@u.nus.edu a/2 College Ave West, Singapore 138607` - * `list` : Lists all contacts. +- `add_module i/1 m/MA2001` - * `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book. +- `delete_module i/2 m/CS1231S` - * `delete 3` : Deletes the 3rd contact shown in the current list. +You may notice a pattern here, and here is a rough breakdown of what a command composes of. Let's use the first example! - * `clear` : Deletes all contacts. +``` +add n/Aditya p/98765432 e/adityab4@u.nus.edu a/2 College Ave West, Singapore 138607 +``` - * `exit` : Exits the app. +Our command composes of: -1. Refer to the [Features](#features) below for details of each command. +1. A Command Word (`add`) --------------------------------------------------------------------------------------------------------------------- + This is the first word of your command that carries the intention of your action! Examples would be using `add` when you want to add a `Friend`, `add_module` when you want to add a `Module` to your `Friend`, so on and so forth! -## Features +2. Prefixes (`n/Aditya p/98765432 e/adityab4@u.nus.edu a/2 College Ave West, Singapore 138607`) + + Prefixes are additional information that you add to your command. For example, when adding a friend you would want to add their **name** and their **email**. + + We can use Prefixes to accomplish this! They are usually marked with an unique identifier (`n/` for **name**, `p/` for **phone number**, etc). You can then add your values after the identifiers! (`Aditya` is the value supplied for the **name** when you type `n/Aditya`). + + **(P.S)** Different commands have different prefixes! Check out the **[Features](#features)** section to see what prefixes exist for each command. +
+### Summary + +In summary, what this command (`add n/Aditya p/98765432 e/adityab4@u.nus.edu a/2 College Ave West, Singapore 138607`) +does is that it adds a `Friend` whose name is `Aditya`, has a phone number `98765432`, has an email is `adityab4@u.nus.edu` and stays at the address `2 College Ave West, Singapore 138607`.
**:information_source: Notes about the command format:**
-* Words in `UPPER_CASE` are the parameters to be supplied by the user.
+- Words in `UPPER_CASE` are the parameters to be supplied by the user.
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.
+- 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`. -* Items with `…`​ after them can be used multiple times including zero times.
+- 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. -* Parameters can be in any order.
+- 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. -* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
+- Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
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. +- 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.
-### Viewing help : `help` +Refer to the [Features](#features) below for details of each command. + +[Back to Table of Contents](#table-of-contents) + +--- +
+## Tutorial +Lets run through the first few steps of using ModContacts to get you started! + +Lets start by clearing the data that comes with the app by default. +1. Run the `clear` command in the input box to clear the data. + +Be careful! This will delete all contacts from ModContacts. Since we don't have any contacts of our own yet, this is a safe command to run. + +You should see something like this +![Clear Contacts](images/tutorial/clear.png) + +{:start="2"} +2. We just had a chat with our friend Taufiq, and found out that he is taking the modules `CS2103T` and `CS20?` next semester. You remember that it's the Data Structures module but don't remember the exact module code. Firstly, lets add him to our contacts list. Since he Rock Climbs, lets add these details as tags into the application. + + Taufiq's Details: + + | Field | Value | + | ------- |----------------------------| + | Name | Taufiq Mohammed | + | Phone | 98765432 | + | Email | taufiq@taufiq.com | + | Address | 123, Clementi Road, 123456 | + | Tags | friend, rockClimbing | + + With this details, we'll run the command + ```bash + add n/Taufiq Mohammed p/81234567 e/taufiq@taufiq.com a/123, Clementi Road, 123456 t/friend t/rockClimbing + ``` + You can add multiple tags for each user. However, spaces in a tag are **not** supported. You'll need to add a `t/` prefix before each tag also. + +![Add a Friend](images/tutorial/add.png) + +{:start="3"} +3. We can now add the module `CS2103T` to Taufiq's list of modules. We'll use the command `add_module i/1 m/CS2103T` to add the module to Taufiq's list of modules. + +The `1` in the above command refers to the index of the friend in the list. Since Taufiq is the first friend in the list, he is at index 1. + +![Add a Module](images/tutorial/add-module.png) + +{:start="4"} +4. Now, since we're unsure which module Taufiq is taking, we can use the `list_modules` command to search for the module. We'll use the command `list_modules m/CS20` to search for modules starting with `CS20`. + +![List Modules](images/tutorial/list-modules.png) + +From this, we can read the descriptions and find out that the module we're looking for is `CS2040S`. Lets add that to Taufiq. `add_module i/1 m/CS2040S`. + +Do note that if you try to add the same module again to the same person, it will give a warning that the module is already added. -Shows a message explaning how to access the help page. +{:start="5"} +5. Suppose you want to add the timing `1600h – 1800h` on Wednesday and `1400h - 1600h` on Thursday to the `CS2103T` and `0800h - 1000h` on Wednesday to the `CS2040S` module Taufiq. -![help message](images/helpMessage.png) +Type the following commands: +- `add_timing i/1 m/CS2103T d/Wed st/1600 et/1800` +- `add_timing i/1 m/CS2103T d/Thu st/1400 et/1600` +- `add_timing i/1 m/CS2040S d/Wed st/0800 et/1000` -Format: `help` +![Add Timing](images/tutorial/add-timing.png) +{:start="6"} +6. Now, using the above commands, we can add the rest of our friends, their modules and its timings. You can use the `list` command to see the entire list of friends in the application -### Adding a person: `add` +![List](images/tutorial/list.png) -Adds a person to the address book. +{:start="7"} +7. Suppose that you're looking for friends to eat lunch with on Wednesday from `1200 - 1400`. With the command `find_free_time d/Wed st/1200 et/1400`, you can find friends who are free during that period. + +![Find Free Time](images/tutorial/find-free-time.png) + +This tutorial is **not exhaustive** and is just a preview of some of the commands you can use in ModContacts. For a full list of commands with a detailed explanation, refer to the [Features](#features) section and for a quick overview of all the commands available, you can look at the [Command Summary](#command-summary). + +--- +
+# Features + +[//]: # "### Viewing help : `help`" +[//]: # +[//]: # "Shows a message explaning how to access the help page." +[//]: # +[//]: # "![help message](images/helpMessage.png)" +[//]: # +[//]: # "Format: `help`" + +## Adding a friend: `add` + +Adds a friend to the mod contacts list. Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​`
:bulb: **Tip:** -A person can have any number of tags (including 0) +A friend can have any number of tags (including 0). Tags only accept alphanumeric values and do not include whitespaces. You can use capitalization such as camel casing to distinguish different words in a tag.
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` -### Listing all persons : `list` +- `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` + +**Before command** + +Suppose you want to add a friend with the following details: + +- Name: John Doe +- Phone No: 9999 1234 +- Email: e1234567@u.nus.edu +- Address: Jurong + +Type the following command: +`add n/John Doe p/9991234 e/e1234567@u.nus.edu a/Address` + +![](images/user-guide/add/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and a new entry is created. + +![](images/user-guide/add/correct.png) -Shows a list of all persons in the address book. +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. + +![](images/user-guide/add/wrong.png) + +## Listing all friends : `list` + +Shows a list of _all_ friends in the ModContacts list. You would need this command as sometimes you might commands (i.e `find`) which shows a filtered list instead of the entire list. Format: `list` -### Editing a person : `edit` +**On Success** -Edits an existing person in the address book. +A message should appear saying that all friends are being listed. + +![](images/user-guide/list/example.png) + +## Editing a friend : `edit` + +Edits an existing friend in the mod contacts list. Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` -* 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. +- Edits the friend at the specified `INDEX`. The index refers to the index number shown in the displayed friend 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 friend will be removed i.e adding of tags is not cumulative. +- You can remove all the friend’s tags by typing `t/` without + specifying any tags after it. + +Examples: + +- `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st friend to be `91234567` and `johndoe@example.com` respectively. +- `edit 2 n/Betsy Crower t/` Edits the name of the 2nd friend to be `Betsy Crower` and clears all existing tags. + +**Before command** + +Suppose you want to edit a friend's name (Like _John Doe_ who we added in this [add](#adding-a-friend-add) example) + +Let's change his name from `John Doe` to `Johnathan Doe`. + +Type the following command: +`edit 1 n/Johnathan Doe` + +![](images/user-guide/edit/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and your friend's name has been edited. + +![](images/user-guide/edit/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we've accidentally written our `name` parameter as `nn/..` instead of `n/..` + +![](images/user-guide/edit/wrong.png) + +## Adding a Module: `add_module` + +Adds a module to your friend in the mod contacts list. + +Format: `add_module i/INDEX m/MODULE_CODE` + +- The `INDEX` refers to the index number shown in the displayed friend list. The index must be a positive integer 1, 2, 3, ... +- The `MODULE_CODE` refers to the module code of the module you intend to add + +
:bulb: **Tip:** + If you are unsure of a module code, you can use [List Modules](#learn-more-about-modules-list_modules) to find it! +
+ +Examples: + +- `add_module i/1 m/MA2001` Adds the module MA2001 to the 1st friend + +**Before command** + +Suppose you want to add a module to the 1st friend on your list + +Let's add `CS2101` to them! + +Type the following command: +`add_module i/1 m/CS2101` + +![](images/user-guide/add-module/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and the module has been added. + +![](images/user-guide/add-module/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we've added a non-existent module code `MA200002`. + +![](images/user-guide/add-module/wrong.png) + +
:bulb: **Reminder:** +Module codes that aren't found in **NUSMods** will be considered invalid. +
+ +## Deleting a Module: `delete_module` + +Deletes a module from your friend in the mod contacts list. + +Format: `delete_module i/INDEX m/MODULE_CODE` + +- The `INDEX` refers to the index number shown in the displayed friend list. The index must be a positive integer 1, 2, 3, ... +- The `MODULE_CODE` refers to the module code of the module you intend to delete + +Examples: + +- `delete_module i/1 m/MA2001` Deletes the module MA2001 to the 1st friend + +**Before command** + +Suppose you want to delete a module from the 1st friend on your list + +Let's remove `CS2101` + +Type the following command: +`delete_module i/1 m/CS2101` + +![](images/user-guide/delete-module/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and the module has been deleted. The changes should be reflected on the list as well. + +![](images/user-guide/delete-module/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we are trying to delete the module `CS2109` which was never added to the friend. + +![](images/user-guide/delete-module/wrong.png) + +## Adding a Module Timing: `add_timing` + +Adds a module's class timing to your friend in the mod contacts list. + +Format: `add_timing i/INDEX m/MODULE_CODE d/DAY st/START_TIME et/END_TIME` + +* The `INDEX` refers to the index number shown in the displayed student list. The index must be a positive integer 1, 2, 3, ... +* The `MODULE_CODE` refers to the module code of the module you intend to add +* The `DAY` refers to the day of the class, i.e. Mon, Tue, Wed, Thu, Fri, Sat, Sun (This is case-sensitive!) +* The `START_TIME` refers to the start time of the class i.e. 0800, 1230, 1845, 2300 +* The `END_TIME` refers to the end time of the class i.e. 0900, 1430, 2045, 2359 + +
:bulb: **Reminder:** +You need to [add the module first](#adding-a-module-add_module) before you add the timing. +
+ +Examples: + +- `add_timing i/1 m/MA2001 d/Mon st/1200 et/1400` Adds a 1200h – 1400h timing for the module MA2001 to the 1st friend + +**Before command** + +Suppose you want to add the timing `1600h – 1800h` to the `CS2101` module for your 1st friend on the list + +Type the following command: +`add_timing i/1 m/CS2101 d/Wed st/1600 et/1800` + +![](images/user-guide/add-timing/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and the timing has been added. The changes should be reflected on the list as well. + +![](images/user-guide/add-timing/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we used an incorrect time format (12h instead of 24h). + +![](images/user-guide/add-timing/wrong.png) + +## Deleting a Module Timing: `delete_timing` + +Deletes a module's class timing from your friend in the mod contacts list. + +Format: `delete_timing i/INDEX m/MODULE_CODE d/DAY st/START_TIME et/END_TIME` + +* The `INDEX` refers to the index number shown in the displayed student list. The index must be a positive integer 1, 2, 3, ... +* The `MODULE_CODE` refers to the module code of the module you intend to add +* The `DAY` refers to the day of the class, i.e. Mon, Tue, Wed, Thu, Fri, Sat, Sun (This is case-sensitive!) +* The `START_TIME` refers to the start time of the class i.e. 0800, 1230, 1845, 2300 +* The `END_TIME` refers to the end time of the class i.e. 0800, 1230, 1845, 2300 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. -### Locating persons by name: `find` +- `delete_timing i/1 m/MA2001 d/Mon st/1200 et/1400` Deletes the 1200h – 1400h timing for the module MA2001 to the 1st friend + +**Before command** + +Suppose you want to delete the timing `1600h – 1800h` to the `CS2101` module for your 1st friend on the list + +Type the following command: +`delete_timing i/1 m/CS2101 d/Wed st/1600 et/1800` + +![](images/user-guide/delete-timing/example.png) -Finds persons whose names contain any of the given keywords. +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and the timing has been deleted. The changes should be reflected on the list as well. + +![](images/user-guide/delete-timing/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we inputted the wrong day (It should be `Wed` and not `Thu`) for the timing that we previously added. + +![](images/user-guide/delete-timing/wrong.png) + +## Locating friends by name: `find` + +Finds friends whose names contain any of the given keywords. Format: `find KEYWORD [MORE_KEYWORDS]` -* The search is case-insensitive. e.g `hans` will match `Hans` -* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. -* Only full words will be matched e.g. `Han` will not match `Hans` -* Persons matching at least one keyword will be returned (i.e. `OR` search). +- The search is case-insensitive. e.g `hans` will match `Hans` +- The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` +- Only the name is searched. +- Only full words will be matched e.g. `Han` will not match `Hans` +- Friends matching at least one keyword will be returned (i.e. `OR` search). 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) -### Deleting a person : `delete` +- `find John` Finds a friend whose name contains `John` -Deletes the specified person from the address book. +**Before command** -Format: `delete INDEX` +Suppose you want to find your friend `John Doe` + +Type the following command: +`find John` + +![](images/user-guide/find/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and how many friends whose names contains the keyword you are searching. A filtered list will then be shown showing who matches the name you are searching for. + +![](images/user-guide/find/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we did not include the keyword to search for. -* Deletes 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, …​ +![](images/user-guide/find/wrong.png) + +## Find friends who are free to meet: `find_free_time` + +Finds friends who are free at this given time period. + +Format: `find_free_time d/DAY st/START_TIME et/END_TIME` + +* The `DAY` refers to the day of the class, i.e. Mon, Tue, Wed, Thu, Fri, Sat, Sun (This is case-sensitive!) +* The `START_TIME` refers to the start time of the class i.e. 0800, 1230, 1845, 2300 +* The `END_TIME` refers to the end time of the class i.e. 0900, 1430, 2045, 2359 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. -### Clearing all entries : `clear` +- `find_free_time d/Wed st/1500 et/1600` Find a list of friends who are free on **Wednesday 1500h – 1600h** -Clears all entries from the address book. +**Before command** -Format: `clear` +Suppose you are free on **Monday 1200h – 1300h** and you would like to find out which friends are free as well. +Your two friends `Alice` and `Bob` are on ModContacts and these are their current schedules on **Monday**. -### Exiting the program : `exit` +- `Alice` has a lesson from **1000h - 1200h** +- `Bob` has a lesson from **1100h - 1300h** -Exits the program. +![](images/user-guide/find-free-time/context.jpg) -Format: `exit` +Type the following command: +`find_free_time d/Mon st/1200 et/1300` + +![](images/user-guide/find-free-time/example.png) + +**On Success** + +If the command is inputted the correctly, a message should appear informing you that the command was successful and how many friends whose names contains the keyword you are searching. A filtered list will then be shown showing which friends are free in the stipulated time. + +![](images/user-guide/find-free-time/correct.png) + +**On Error** + +If the command is improperly formatted or certain parameters are missing the app will show what fields are needed and how a properly inputted command should look like. In this example we did not key in the day in the proper format (`Monday` instead of `Mon`) + +![](images/user-guide/find-free-time/wrong.png) + +## Learn more about modules: `list_modules` -### Saving the data +List Modules allows you to search for the available modules in NUS and get its description. -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +Format: `list_modules m/MODULE_CODE` -### Editing the data file +* The `MODULE_CODE` refers to the *prefix* or the first few characters of the module you intend to search. This search **case insensitive**, which means searching with `m/CS2103` and `m/cs2103` will yield the same results. -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. +For example, you can search for all modules starting with `CS21` with the command `list_modules m/cs21` and it will list all modules in NUS starting with the given module code. + +
:bulb: **Tip:** +This command is useful when you're adding a friend to the addressbook. If you only remember the first few characters of their module code, you can search it up and read the descriptions to identify the correct module. +
+ +![List Modules](images/ListModules.png)
:exclamation: **Caution:** -If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
-Furthermore, certain edits can cause the AddressBook to behave in unexpected ways (e.g., if a value entered is outside of the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly. + +If no valid modules are found, the message "No modules found with prefix `[MODULE_CODE]`" will be displayed.
-### Archiving data files `[coming in v2.0]` +## Find friends with modules: `module_search` + +Looking for buddies to discuss schoowork? Finds friends who are taking the specified module. -_Details coming soon ..._ +Format: `module_search m/MODULE_CODE` --------------------------------------------------------------------------------------------------------------------- +* The `MODULE_CODE` refers to the **FULL** module you intend to search. This is `case insensitive`, which means searching with `m/CS2103T` and `m/cs2103T` will yield the same results. + +
:bulb: **Tip:** +If you cannot remember the full module code, [list_modules](#learn-more-about-modules-list_modules) can be used to find the correct module +
+ +![Module Search](images/ModuleSearch.png) + +
:exclamation: **Caution:** + +If no friends are found with the specified module, the message "0 students listed" will be displayed. + +However, if an invalid module code is given, an error message will show up, informing you that the module code is invalid and a valid module code can be found using the `list_modules` command. +
-## FAQ +## Deleting a friend : `delete` + +Deletes the specified friend from the mod contacts list. + +Format: `delete INDEX` + +- Deletes the friend at the specified `INDEX`. +- The index refers to the index number shown in the displayed friend list. +- The index **must be a positive integer** 1, 2, 3, …​ + +Examples: + +- `list` followed by `delete 2` deletes the 2nd friend in the mod contacts list. +- `find Betsy` followed by `delete 1` deletes the 1st friend in the results of the `find` command. + +## Clearing all entries : `clear` + +Clears all entries from the mod contacts list. + +Format: `clear` + +## Exiting the program : `exit` + +Exits the program. + +Format: `exit` + +--- +
+# FAQ **Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder. +**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous ModContacts home folder. --------------------------------------------------------------------------------------------------------------------- +**Q**: How do I know if my data is saved?
+**A**: ModContacts data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. -## Known issues +**Q**: Can I manually edit the data file?
+**A**: ModContacts data are saved automatically as a JSON file `[JAR file location]/data/modcontacts.json`. Advanced users are welcome to update data directly by editing that data file. -1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again. +
:exclamation: **Caution:** +If your changes to the data file makes its format invalid, ModContacts will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
+Furthermore, certain edits can cause the ModContacts to behave in unexpected ways (e.g., if a value entered is outside of the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly. +
--------------------------------------------------------------------------------------------------------------------- +--- +
+# Glossary + +| Glossary Term | Definition | +| --- | --- | +| CLI | Command Line Interface, the text-based interface for interacting with ModContacts. | +| GUI | Graphical User Interface, the visual interface for interacting with ModContacts. | +| Command | The instruction given to ModContacts to perform a specific action. | +| Prefix | A **1** letter keyword, with a `/` at the end, such as `m/`, `i/` that is used to specify the type of data for the command. | +| NUS | National University of Singapore, the university that ModContacts is designed for. | +| SoC | School of Computing, the faculty in NUS that ModContacts is designed for. | +| field | A piece of information that can be added to a command. e.g. `n/John Doe` has the field John Doe, with the prefix `n/`. | +| camel casing | A casing format where words are not separated by whitespaces. Words are joined together and the first letter of each word, except the first one, is capital. Example: "thisIsCamelCasing" is "this is camel casing" in camel casing. + +--- -## Command summary +## Known issues -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` -**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` -**Find** | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` -**List** | `list` -**Help** | `help` +1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again. + +--- +# Command summary + +| Action | Format, Examples | +| ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Help** | `help` | +| [**Add**](#adding-a-module-add_module) | `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` | +| [**List**](#listing-all-students--list) | `list` | +| [**Edit**](#editing-a-student--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` | +| [**Delete**](#deleting-a-module-delete_module) | `delete INDEX`
e.g., `delete 3` | +| [**Add Module**](#adding-a-module-add_module) | `add_module i/INDEX m/MODULE_CODE`
e.g., `add_module i/1 m/CS2103T` | +| [**Delete Module**](#deleting-a-module-delete_module) | `delete_module i/INDEX m/MODULE_CODE`
e.g., `delete_module i/1 m/MA2001` | +| [**Add Timing**](#adding-a-module-timing-add_timing) | `add_timing i/INDEX m/MODULE_CODE d/DAY st/START_TIME et/END_TIME`
e.g., `add_timing i/1 m/MA2001 d/Mon st/1200 et/1400` | +| [**Delete Timing**](#deleting-a-module-timing-delete_timing) | `delete_timing i/INDEX m/MODULE_CODE d/DAY st/START_TIME et/END_TIME`
e.g., `delete_timing i/1 m/MA2001 d/Mon st/1200 et/1400` | +| [**Find**](#locating-students-by-name-find) | `find KEYWORD [MORE_KEYWORDS]`
e.g., `find James Jake` | +| [**Find Free Timing**](#find-friends-who-are-free-to-meet-find_free_time) | `find_free_time d/DAY st/START_TIME et/END_TIME`
e.g., `find_free_time d/Wed st/1500 et/1600` | +| [**List Modules**](#learn-more-about-modules-list_modules) | `list_modules m/MODULE_CODE`
e.g. `list_modules m/cs21` | +| [**Search Module**](#find-friends-with-modules-module_search) | `search m/MODULE_CODE`
e.g. `search m/CS2103T` | +| [**Clear**](#clearing-all-entries--clear) | `clear` | +| [**Exit**](#exiting-the-program--exit) | `exit` | diff --git a/docs/_config.yml b/docs/_config.yml index 6bd245d8f4..e9b746e4cf 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,5 +1,6 @@ -title: "AB-3" +title: "ModContacts" theme: minima +toc: true header_pages: - UserGuide.md @@ -8,7 +9,7 @@ header_pages: markdown: kramdown -repository: "se-edu/addressbook-level3" +repository: "AY2324S2-CS2103T-W12-2/tp" github_icon: "images/github-icon.png" plugins: diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss index 0d3f6e80ce..153bc5e34c 100644 --- a/docs/_sass/minima/_base.scss +++ b/docs/_sass/minima/_base.scss @@ -288,7 +288,7 @@ table { text-align: center; } .site-header:before { - content: "AB-3"; + content: "ModContacts"; font-size: 32px; } } diff --git a/docs/diagrams/AddModuleTimingSequenceDiagram.puml b/docs/diagrams/AddModuleTimingSequenceDiagram.puml new file mode 100644 index 0000000000..d0046d7861 --- /dev/null +++ b/docs/diagrams/AddModuleTimingSequenceDiagram.puml @@ -0,0 +1,70 @@ +@startuml +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":AddStudentModuleTimingCommandParser" as AddStudentModuleTimingCommandParser LOGIC_COLOR +participant "d:AddStudentModuleTimingCommand" as AddStudentModuleTimingCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant "m:Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("add_timing i/1 m/CS2103T d/Mon st/0800 et/1200") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("add_timing i/1 m/CS2103T d/Mon st/0800 et/1200") +activate AddressBookParser + +create AddStudentModuleTimingCommandParser +AddressBookParser -> AddStudentModuleTimingCommandParser +activate AddStudentModuleTimingCommandParser + +AddStudentModuleTimingCommandParser --> AddressBookParser +deactivate AddStudentModuleTimingCommandParser + +AddressBookParser -> AddStudentModuleTimingCommandParser : parse("i/1 m/CS2103T d/Mon st/0800 et/1200") +activate AddStudentModuleTimingCommandParser + +create AddStudentModuleTimingCommand +AddStudentModuleTimingCommandParser -> AddStudentModuleTimingCommand +activate AddStudentModuleTimingCommand + +AddStudentModuleTimingCommand --> AddStudentModuleTimingCommandParser : +deactivate AddStudentModuleTimingCommand + +AddStudentModuleTimingCommandParser --> AddressBookParser : d +deactivate AddStudentModuleTimingCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +AddStudentModuleTimingCommandParser -[hidden]-> AddressBookParser +destroy AddStudentModuleTimingCommandParser + +AddressBookParser --> LogicManager : d +deactivate AddressBookParser + +LogicManager -> AddStudentModuleTimingCommand : execute(m) +activate AddStudentModuleTimingCommand + +AddStudentModuleTimingCommand -> Model : addModuleTimingToStudent(moduleTiming, studentToModify) +activate Model + +Model --> AddStudentModuleTimingCommand +deactivate Model + +create CommandResult +AddStudentModuleTimingCommand -> CommandResult +activate CommandResult + +CommandResult --> AddStudentModuleTimingCommand +deactivate CommandResult + +AddStudentModuleTimingCommand --> LogicManager : r +deactivate AddStudentModuleTimingCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml index 48b6cc4333..1a887d8c1d 100644 --- a/docs/diagrams/ArchitectureSequenceDiagram.puml +++ b/docs/diagrams/ArchitectureSequenceDiagram.puml @@ -14,7 +14,7 @@ activate ui UI_COLOR ui -[UI_COLOR]> logic : execute("delete 1") activate logic LOGIC_COLOR -logic -[LOGIC_COLOR]> model : deletePerson(p) +logic -[LOGIC_COLOR]> model : deleteStudent(p) activate model MODEL_COLOR model -[MODEL_COLOR]-> logic diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml index 598474a5c8..7eac22ee97 100644 --- a/docs/diagrams/BetterModelClassDiagram.puml +++ b/docs/diagrams/BetterModelClassDiagram.puml @@ -4,18 +4,18 @@ skinparam arrowThickness 1.1 skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR -AddressBook *-right-> "1" UniquePersonList +AddressBook *-right-> "1" UniqueStudentList AddressBook *-right-> "1" UniqueTagList -UniqueTagList -[hidden]down- UniquePersonList -UniqueTagList -[hidden]down- UniquePersonList +UniqueTagList -[hidden]down- UniqueStudentList +UniqueTagList -[hidden]down- UniqueStudentList UniqueTagList -right-> "*" Tag -UniquePersonList -right-> Person +UniqueStudentList -right-> Student -Person -up-> "*" Tag +Student -up-> "*" Tag -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address +Student *--> Name +Student *--> Phone +Student *--> Email +Student *--> Address @enduml diff --git a/docs/diagrams/DeleteModuleTimingSequenceDiagram.puml b/docs/diagrams/DeleteModuleTimingSequenceDiagram.puml new file mode 100644 index 0000000000..f004f326a4 --- /dev/null +++ b/docs/diagrams/DeleteModuleTimingSequenceDiagram.puml @@ -0,0 +1,71 @@ +@startuml +'Belongs to @AdityaB4, Adapted from author of AddModuleTimingSequenceDiagram +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":DeleteStudentModuleTimingCommandParser" as DeleteStudentModuleTimingCommandParser LOGIC_COLOR +participant "d:DeleteStudentModuleTimingCommand" as DeleteStudentModuleTimingCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant "m:Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("delete_timing i/1 m/CS2103T d/Mon st/0800 et/1200") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("delete_timing i/1 m/CS2103T d/Mon st/0800 et/1200") +activate AddressBookParser + +create DeleteStudentModuleTimingCommandParser +AddressBookParser -> DeleteStudentModuleTimingCommandParser +activate DeleteStudentModuleTimingCommandParser + +DeleteStudentModuleTimingCommandParser --> AddressBookParser +deactivate DeleteStudentModuleTimingCommandParser + +AddressBookParser -> DeleteStudentModuleTimingCommandParser : parse("i/1 m/CS2103T d/Mon st/0800 et/1200") +activate DeleteStudentModuleTimingCommandParser + +create DeleteStudentModuleTimingCommand +DeleteStudentModuleTimingCommandParser -> DeleteStudentModuleTimingCommand +activate DeleteStudentModuleTimingCommand + +DeleteStudentModuleTimingCommand --> DeleteStudentModuleTimingCommandParser : +deactivate DeleteStudentModuleTimingCommand + +DeleteStudentModuleTimingCommandParser --> AddressBookParser : d +deactivate DeleteStudentModuleTimingCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +DeleteStudentModuleTimingCommandParser -[hidden]-> AddressBookParser +destroy DeleteStudentModuleTimingCommandParser + +AddressBookParser --> LogicManager : d +deactivate AddressBookParser + +LogicManager -> DeleteStudentModuleTimingCommand : execute(m) +activate DeleteStudentModuleTimingCommand + +DeleteStudentModuleTimingCommand -> Model : deleteModuleTimingFromStudent(moduleTiming, studentToModify) +activate Model + +Model --> DeleteStudentModuleTimingCommand +deactivate Model + +create CommandResult +DeleteStudentModuleTimingCommand -> CommandResult +activate CommandResult + +CommandResult --> DeleteStudentModuleTimingCommand +deactivate CommandResult + +DeleteStudentModuleTimingCommand --> LogicManager : r +deactivate DeleteStudentModuleTimingCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml index 5241e79d7d..e7a1e82a9f 100644 --- a/docs/diagrams/DeleteSequenceDiagram.puml +++ b/docs/diagrams/DeleteSequenceDiagram.puml @@ -49,7 +49,7 @@ deactivate AddressBookParser LogicManager -> DeleteCommand : execute(m) activate DeleteCommand -DeleteCommand -> Model : deletePerson(1) +DeleteCommand -> Model : deleteStudent(1) activate Model Model --> DeleteCommand diff --git a/docs/diagrams/FindFreeTimeSequenceDiagram.png b/docs/diagrams/FindFreeTimeSequenceDiagram.png new file mode 100644 index 0000000000..436db2bc67 Binary files /dev/null and b/docs/diagrams/FindFreeTimeSequenceDiagram.png differ diff --git a/docs/diagrams/FindFreeTimeSequenceDiagram.puml b/docs/diagrams/FindFreeTimeSequenceDiagram.puml new file mode 100644 index 0000000000..b73e4f3480 --- /dev/null +++ b/docs/diagrams/FindFreeTimeSequenceDiagram.puml @@ -0,0 +1,71 @@ +@startuml +'Belongs to @taufiq, Copied from author of AddModuleTimingSequenceDiagram +!include style.puml +skinparam ArrowFontStyle plain + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":FindFreeTimeCommandParser" as FindFreeTimeCommandParser LOGIC_COLOR +participant "d:FindFreeTimeCommand" as FindFreeTimeCommand LOGIC_COLOR +participant "r:CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant "m:Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("find_free_time d/Wed st/1200 et/1400") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("find_free_time d/Wed st/1200 et/1400") +activate AddressBookParser + +create FindFreeTimeCommandParser +AddressBookParser -> FindFreeTimeCommandParser +activate FindFreeTimeCommandParser + +FindFreeTimeCommandParser --> AddressBookParser +deactivate FindFreeTimeCommandParser + +AddressBookParser -> FindFreeTimeCommandParser : parse("d/Wed st/1200 et/1400") +activate FindFreeTimeCommandParser + +create FindFreeTimeCommand +FindFreeTimeCommandParser -> FindFreeTimeCommand +activate FindFreeTimeCommand + +FindFreeTimeCommand --> FindFreeTimeCommandParser : +deactivate FindFreeTimeCommand + +FindFreeTimeCommandParser --> AddressBookParser : d +deactivate FindFreeTimeCommandParser +'Hidden arrow to position the destroy marker below the end of the activation bar. +FindFreeTimeCommandParser -[hidden]-> AddressBookParser +destroy FindFreeTimeCommandParser + +AddressBookParser --> LogicManager : d +deactivate AddressBookParser + +LogicManager -> FindFreeTimeCommand : execute(m) +activate FindFreeTimeCommand + +FindFreeTimeCommand -> Model : updateFilteredStudentList(freePredicate) +activate Model + +Model --> FindFreeTimeCommand +deactivate Model + +create CommandResult +FindFreeTimeCommand -> CommandResult +activate CommandResult + +CommandResult --> FindFreeTimeCommand +deactivate CommandResult + +FindFreeTimeCommand --> LogicManager : r +deactivate FindFreeTimeCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml index 0de5673070..34b85973aa 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -12,8 +12,8 @@ Class AddressBook Class ModelManager Class UserPrefs -Class UniquePersonList -Class Person +Class UniqueStudentList +Class Student Class Address Class Email Class Name @@ -21,6 +21,13 @@ Class Phone Class Tag Class I #FFFFFF + +Class ModuleMap + +Class Module +Class ModuleCode +Class Title +Class Description } Class HiddenOutside #FFFFFF @@ -31,24 +38,34 @@ AddressBook .up.|> ReadOnlyAddressBook ModelManager .up.|> Model Model .right.> ReadOnlyUserPrefs Model .left.> ReadOnlyAddressBook -ModelManager -left-> "1" AddressBook +ModelManager -right-> "1" AddressBook +ModelManager -right-> "1" ModuleMap ModelManager -right-> "1" UserPrefs UserPrefs .up.|> ReadOnlyUserPrefs -AddressBook *--> "1" UniquePersonList -UniquePersonList --> "~* all" Person -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address -Person *--> "*" Tag +AddressBook *--> "1" UniqueStudentList +UniqueStudentList --> "~* all" Student +Student *--> Name +Student *--> Phone +Student *--> Email +Student *--> Address +Student *--> "*" Tag +Student *--> "*" ModuleCode -Person -[hidden]up--> I -UniquePersonList -[hidden]right-> I +Student -[hidden]up--> I +UniqueStudentList -[hidden]right-> I Name -[hidden]right-> Phone Phone -[hidden]right-> Address Address -[hidden]right-> Email -ModelManager --> "~* filtered" Person +ModelManager --> "~* filtered" Student + +ModuleMap --> "~* all" Module +Module *--> ModuleCode +Module *--> Title +Module *--> Description + +ModuleCode -[hidden]right-> Title +Title -[hidden]right-> Description @enduml diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml index a821e06458..858d9719ea 100644 --- a/docs/diagrams/StorageClassDiagram.puml +++ b/docs/diagrams/StorageClassDiagram.puml @@ -18,10 +18,15 @@ package "AddressBook Storage" #F4F6F6{ Class "<>\nAddressBookStorage" as AddressBookStorage Class JsonAddressBookStorage Class JsonSerializableAddressBook -Class JsonAdaptedPerson +Class JsonAdaptedStudent Class JsonAdaptedTag } +package "ModuleMap Storage" #F4F6F6 { +Class "<>\nModuleMapStorage" as ModuleMapStorage +Class JsonModuleMapStorage +} + } Class HiddenOutside #FFFFFF @@ -33,11 +38,15 @@ StorageManager -up-> "1" AddressBookStorage Storage -left-|> UserPrefsStorage Storage -right-|> AddressBookStorage +Storage -right-|> ModuleMapStorage JsonUserPrefsStorage .up.|> UserPrefsStorage JsonAddressBookStorage .up.|> AddressBookStorage JsonAddressBookStorage ..> JsonSerializableAddressBook -JsonSerializableAddressBook --> "*" JsonAdaptedPerson -JsonAdaptedPerson --> "*" JsonAdaptedTag +JsonSerializableAddressBook --> "*" JsonAdaptedStudent +JsonAdaptedStudent --> "*" JsonAdaptedTag + +JsonModuleMapStorage .up.|> ModuleMapStorage + @enduml diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 95473d5aa1..927a634227 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -11,8 +11,8 @@ Class UiManager Class MainWindow Class HelpWindow Class ResultDisplay -Class PersonListPanel -Class PersonCard +Class StudentListPanel +Class StudentCard Class StatusBarFooter Class CommandBox } @@ -32,26 +32,26 @@ UiManager .left.|> Ui UiManager -down-> "1" MainWindow MainWindow *-down-> "1" CommandBox MainWindow *-down-> "1" ResultDisplay -MainWindow *-down-> "1" PersonListPanel +MainWindow *-down-> "1" StudentListPanel MainWindow *-down-> "1" StatusBarFooter MainWindow --> "0..1" HelpWindow -PersonListPanel -down-> "*" PersonCard +StudentListPanel -down-> "*" StudentCard MainWindow -left-|> UiPart ResultDisplay --|> UiPart CommandBox --|> UiPart -PersonListPanel --|> UiPart -PersonCard --|> UiPart +StudentListPanel --|> UiPart +StudentCard --|> UiPart StatusBarFooter --|> UiPart HelpWindow --|> UiPart -PersonCard ..> Model +StudentCard ..> Model UiManager -right-> Logic MainWindow -left-> Logic -PersonListPanel -[hidden]left- HelpWindow +StudentListPanel -[hidden]left- HelpWindow HelpWindow -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay ResultDisplay -[hidden]left- StatusBarFooter diff --git a/docs/diagrams/tracing/LogicSequenceDiagram.puml b/docs/diagrams/tracing/LogicSequenceDiagram.puml index 42bf46d3ce..acbf5532bc 100644 --- a/docs/diagrams/tracing/LogicSequenceDiagram.puml +++ b/docs/diagrams/tracing/LogicSequenceDiagram.puml @@ -14,7 +14,7 @@ create ecp abp -> ecp abp -> ecp ++: parse(arguments) create ec -ecp -> ec ++: index, editPersonDescriptor +ecp -> ec ++: index, editStudentDescriptor ec --> ecp -- ecp --> abp --: command abp --> logic --: command diff --git a/docs/images/AddModuleInvalid.png b/docs/images/AddModuleInvalid.png new file mode 100644 index 0000000000..72e97c09e2 Binary files /dev/null and b/docs/images/AddModuleInvalid.png differ diff --git a/docs/images/AddModuleTimingSequenceDiagram.png b/docs/images/AddModuleTimingSequenceDiagram.png new file mode 100644 index 0000000000..8b7a8bf72f Binary files /dev/null and b/docs/images/AddModuleTimingSequenceDiagram.png differ diff --git a/docs/images/AnnotatedUi.png b/docs/images/AnnotatedUi.png new file mode 100644 index 0000000000..d4d1f26158 Binary files /dev/null and b/docs/images/AnnotatedUi.png differ diff --git a/docs/images/DeleteModuleTimingSequenceDiagram.png b/docs/images/DeleteModuleTimingSequenceDiagram.png new file mode 100644 index 0000000000..63ce245d1b Binary files /dev/null and b/docs/images/DeleteModuleTimingSequenceDiagram.png differ diff --git a/docs/images/FirstLaunch.png b/docs/images/FirstLaunch.png new file mode 100644 index 0000000000..c050859d16 Binary files /dev/null and b/docs/images/FirstLaunch.png differ diff --git a/docs/images/ListModules.png b/docs/images/ListModules.png new file mode 100644 index 0000000000..7043eaeef8 Binary files /dev/null and b/docs/images/ListModules.png differ diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png index a19fb1b4ac..55ca6674a4 100644 Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ diff --git a/docs/images/ModuleSearch.png b/docs/images/ModuleSearch.png new file mode 100644 index 0000000000..84ed7ce8b0 Binary files /dev/null and b/docs/images/ModuleSearch.png differ diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png index 18fa4d0d51..d9cba6d8cb 100644 Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 5bd77847aa..0999ca923b 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/docs/images/adityab4.png b/docs/images/adityab4.png new file mode 100644 index 0000000000..1c5f3ab043 Binary files /dev/null and b/docs/images/adityab4.png differ diff --git a/docs/images/blaukc.png b/docs/images/blaukc.png new file mode 100644 index 0000000000..cd7caab607 Binary files /dev/null and b/docs/images/blaukc.png differ diff --git a/docs/images/taufiq.png b/docs/images/taufiq.png new file mode 100644 index 0000000000..0e67e09b5d Binary files /dev/null and b/docs/images/taufiq.png differ diff --git a/docs/images/tutorial/add-module.png b/docs/images/tutorial/add-module.png new file mode 100644 index 0000000000..c3349129a1 Binary files /dev/null and b/docs/images/tutorial/add-module.png differ diff --git a/docs/images/tutorial/add-timing.png b/docs/images/tutorial/add-timing.png new file mode 100644 index 0000000000..1a9657be9f Binary files /dev/null and b/docs/images/tutorial/add-timing.png differ diff --git a/docs/images/tutorial/add.png b/docs/images/tutorial/add.png new file mode 100644 index 0000000000..a3b2a1d64b Binary files /dev/null and b/docs/images/tutorial/add.png differ diff --git a/docs/images/tutorial/clear.png b/docs/images/tutorial/clear.png new file mode 100644 index 0000000000..84a34a9b05 Binary files /dev/null and b/docs/images/tutorial/clear.png differ diff --git a/docs/images/tutorial/find-free-time.png b/docs/images/tutorial/find-free-time.png new file mode 100644 index 0000000000..5159c87f1d Binary files /dev/null and b/docs/images/tutorial/find-free-time.png differ diff --git a/docs/images/tutorial/list-modules.png b/docs/images/tutorial/list-modules.png new file mode 100644 index 0000000000..ef08db2326 Binary files /dev/null and b/docs/images/tutorial/list-modules.png differ diff --git a/docs/images/tutorial/list.png b/docs/images/tutorial/list.png new file mode 100644 index 0000000000..8345008679 Binary files /dev/null and b/docs/images/tutorial/list.png differ diff --git a/docs/images/user-guide/add-module/correct.png b/docs/images/user-guide/add-module/correct.png new file mode 100644 index 0000000000..340fea13b8 Binary files /dev/null and b/docs/images/user-guide/add-module/correct.png differ diff --git a/docs/images/user-guide/add-module/example.png b/docs/images/user-guide/add-module/example.png new file mode 100644 index 0000000000..938971573b Binary files /dev/null and b/docs/images/user-guide/add-module/example.png differ diff --git a/docs/images/user-guide/add-module/wrong.png b/docs/images/user-guide/add-module/wrong.png new file mode 100644 index 0000000000..2155dd72f3 Binary files /dev/null and b/docs/images/user-guide/add-module/wrong.png differ diff --git a/docs/images/user-guide/add-timing/correct.png b/docs/images/user-guide/add-timing/correct.png new file mode 100644 index 0000000000..85c745015f Binary files /dev/null and b/docs/images/user-guide/add-timing/correct.png differ diff --git a/docs/images/user-guide/add-timing/example.png b/docs/images/user-guide/add-timing/example.png new file mode 100644 index 0000000000..7410689efd Binary files /dev/null and b/docs/images/user-guide/add-timing/example.png differ diff --git a/docs/images/user-guide/add-timing/wrong.png b/docs/images/user-guide/add-timing/wrong.png new file mode 100644 index 0000000000..5de5957809 Binary files /dev/null and b/docs/images/user-guide/add-timing/wrong.png differ diff --git a/docs/images/user-guide/add/correct.png b/docs/images/user-guide/add/correct.png new file mode 100644 index 0000000000..9a1afcc58b Binary files /dev/null and b/docs/images/user-guide/add/correct.png differ diff --git a/docs/images/user-guide/add/example.png b/docs/images/user-guide/add/example.png new file mode 100644 index 0000000000..d12fed737d Binary files /dev/null and b/docs/images/user-guide/add/example.png differ diff --git a/docs/images/user-guide/add/wrong.png b/docs/images/user-guide/add/wrong.png new file mode 100644 index 0000000000..12e39ee355 Binary files /dev/null and b/docs/images/user-guide/add/wrong.png differ diff --git a/docs/images/user-guide/delete-module/correct.png b/docs/images/user-guide/delete-module/correct.png new file mode 100644 index 0000000000..cdae7bf466 Binary files /dev/null and b/docs/images/user-guide/delete-module/correct.png differ diff --git a/docs/images/user-guide/delete-module/example.png b/docs/images/user-guide/delete-module/example.png new file mode 100644 index 0000000000..b6623aef6d Binary files /dev/null and b/docs/images/user-guide/delete-module/example.png differ diff --git a/docs/images/user-guide/delete-module/wrong.png b/docs/images/user-guide/delete-module/wrong.png new file mode 100644 index 0000000000..b244e5ecf8 Binary files /dev/null and b/docs/images/user-guide/delete-module/wrong.png differ diff --git a/docs/images/user-guide/delete-timing/correct.png b/docs/images/user-guide/delete-timing/correct.png new file mode 100644 index 0000000000..2d484cecd4 Binary files /dev/null and b/docs/images/user-guide/delete-timing/correct.png differ diff --git a/docs/images/user-guide/delete-timing/example.png b/docs/images/user-guide/delete-timing/example.png new file mode 100644 index 0000000000..940efbbcb5 Binary files /dev/null and b/docs/images/user-guide/delete-timing/example.png differ diff --git a/docs/images/user-guide/delete-timing/wrong.png b/docs/images/user-guide/delete-timing/wrong.png new file mode 100644 index 0000000000..3accf3e334 Binary files /dev/null and b/docs/images/user-guide/delete-timing/wrong.png differ diff --git a/docs/images/user-guide/edit/correct.png b/docs/images/user-guide/edit/correct.png new file mode 100644 index 0000000000..64ff39e262 Binary files /dev/null and b/docs/images/user-guide/edit/correct.png differ diff --git a/docs/images/user-guide/edit/example.png b/docs/images/user-guide/edit/example.png new file mode 100644 index 0000000000..ed0bb5153b Binary files /dev/null and b/docs/images/user-guide/edit/example.png differ diff --git a/docs/images/user-guide/edit/wrong.png b/docs/images/user-guide/edit/wrong.png new file mode 100644 index 0000000000..2c9963b573 Binary files /dev/null and b/docs/images/user-guide/edit/wrong.png differ diff --git a/docs/images/user-guide/find-free-time/context.jpg b/docs/images/user-guide/find-free-time/context.jpg new file mode 100644 index 0000000000..c0b2d60635 Binary files /dev/null and b/docs/images/user-guide/find-free-time/context.jpg differ diff --git a/docs/images/user-guide/find-free-time/correct.png b/docs/images/user-guide/find-free-time/correct.png new file mode 100644 index 0000000000..3144818fb9 Binary files /dev/null and b/docs/images/user-guide/find-free-time/correct.png differ diff --git a/docs/images/user-guide/find-free-time/example.png b/docs/images/user-guide/find-free-time/example.png new file mode 100644 index 0000000000..9c477a440f Binary files /dev/null and b/docs/images/user-guide/find-free-time/example.png differ diff --git a/docs/images/user-guide/find-free-time/wrong.png b/docs/images/user-guide/find-free-time/wrong.png new file mode 100644 index 0000000000..018e233810 Binary files /dev/null and b/docs/images/user-guide/find-free-time/wrong.png differ diff --git a/docs/images/user-guide/find/correct.png b/docs/images/user-guide/find/correct.png new file mode 100644 index 0000000000..1f2a09e4f4 Binary files /dev/null and b/docs/images/user-guide/find/correct.png differ diff --git a/docs/images/user-guide/find/example.png b/docs/images/user-guide/find/example.png new file mode 100644 index 0000000000..0d24fa3c0f Binary files /dev/null and b/docs/images/user-guide/find/example.png differ diff --git a/docs/images/user-guide/find/wrong.png b/docs/images/user-guide/find/wrong.png new file mode 100644 index 0000000000..dcf497f7b9 Binary files /dev/null and b/docs/images/user-guide/find/wrong.png differ diff --git a/docs/images/user-guide/list/example.png b/docs/images/user-guide/list/example.png new file mode 100644 index 0000000000..987860d8df Binary files /dev/null and b/docs/images/user-guide/list/example.png differ diff --git a/docs/images/yadunut.png b/docs/images/yadunut.png new file mode 100644 index 0000000000..aa396ae991 Binary files /dev/null and b/docs/images/yadunut.png differ diff --git a/docs/index.md b/docs/index.md index 7601dbaad0..614608224e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,9 @@ --- layout: page -title: AddressBook Level-3 +title: ModContacts --- -[![CI Status](https://github.com/se-edu/addressbook-level3/workflows/Java%20CI/badge.svg)](https://github.com/se-edu/addressbook-level3/actions) -[![codecov](https://codecov.io/gh/se-edu/addressbook-level3/branch/master/graph/badge.svg)](https://codecov.io/gh/se-edu/addressbook-level3) +[![CI Status](https://github.com/AY2324S2-CS2103T-W12-2/tp/workflows/Java%20CI/badge.svg)](https://github.com/AY2324S2-CS2103T-W12-2/tp/actions) ![Ui](images/Ui.png) diff --git a/docs/team/adityab4.md b/docs/team/adityab4.md new file mode 100644 index 0000000000..2a2f01c222 --- /dev/null +++ b/docs/team/adityab4.md @@ -0,0 +1,35 @@ +--- +layout: page +title: adityab4's Project Portfolio Page +--- + +### Project: ModContacts + +ModContacts is a desktop address book application used to manage our friend's contacts and the modules they are taking. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +- Added information about me! + + +- **Code contributed**: [RepoSense link]() + + +- **Project management**: + + +- **Enhancements to existing features**: + + +- **Documentation**: + - User Guide: + - Something + - Developer Guide: + - Something + + +- **Community**: + -PRs reviewed (with non-trivial review comments): + + +- **Tools**: diff --git a/docs/team/blaukc.md b/docs/team/blaukc.md new file mode 100644 index 0000000000..4e5a7d27e1 --- /dev/null +++ b/docs/team/blaukc.md @@ -0,0 +1,38 @@ +--- +layout: page +title: blaukc's Project Portfolio Page +--- + +### Project: ModContacts + +ModContacts is a desktop address book application used to manage our friend's contacts and the modules they are taking. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +- **New Feature**: Currently nothing + - What it does: Currently nothing + - Justification: Currently nothing + - Highlights: Currently nothing + + +- **Code contributed**: [RepoSense link]() + + +- **Project management**: + + +- **Enhancements to existing features**: + + +- **Documentation**: + - User Guide: + - Something + - Developer Guide: + - Something + + +- **Community**: + -PRs reviewed (with non-trivial review comments): + + +- **Tools**: diff --git a/docs/team/taufiq.md b/docs/team/taufiq.md new file mode 100644 index 0000000000..451e8b0ec6 --- /dev/null +++ b/docs/team/taufiq.md @@ -0,0 +1,38 @@ +--- +layout: page +title: taufiq's Project Portfolio Page +--- + +### Project: ModContacts + +ModContacts is a desktop address book application used to manage our friend's contacts and the modules they are taking. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +- **New Feature**: Currently nothing + - What it does: Currently nothing + - Justification: Currently nothing + - Highlights: Currently nothing + + +- **Code contributed**: [RepoSense link]() + + +- **Project management**: + + +- **Enhancements to existing features**: + + +- **Documentation**: + - User Guide: + - Something + - Developer Guide: + - Something + + +- **Community**: + -PRs reviewed (with non-trivial review comments): + + +- **Tools**: diff --git a/docs/team/yadunut.md b/docs/team/yadunut.md new file mode 100644 index 0000000000..865f997fd4 --- /dev/null +++ b/docs/team/yadunut.md @@ -0,0 +1,27 @@ +--- +layout: page +title: Yadunand's Project Portfolio Page +--- + +### Project: ModContacts + +ModContacts is a desktop address book application used to manage our friend's contacts and the modules they are taking. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. + +Given below are my contributions to the project. + +* Setting up the CI pipeline and ensuring it was working +* Setting up the project page + +* **Code contributed**: [RepoSense link]() + +* **Project management**: + +* **Enhancements to existing features**: + +* **Documentation**: + * User Guide: + * Developer Guide: + +* **Community**: + +* **Tools**: diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md index d98f38982e..3a44477dcc 100644 --- a/docs/tutorials/AddRemark.md +++ b/docs/tutorials/AddRemark.md @@ -28,7 +28,7 @@ package seedu.address.logic.commands; import seedu.address.model.Model; /** - * Changes the remark of an existing person in the address book. + * Changes the remark of an existing student in the address book. */ public class RemarkCommand extends Command { @@ -65,8 +65,8 @@ Following the convention in other commands, we add relevant messages as constant ``` java public static final String MESSAGE_USAGE = COMMAND_WORD - + ": Edits the remark of the person identified " - + "by the index number used in the last person listing. " + + ": Edits the remark of the student identified " + + "by the index number used in the last student listing. " + "Existing remark will be overwritten by the input.\n" + "Parameters: INDEX (must be a positive integer) " + "r/ [REMARK]\n" @@ -101,8 +101,8 @@ public class RemarkCommand extends Command { private final String remark; /** - * @param index of the person in the filtered person list to edit the remark - * @param remark of the person to be updated to + * @param index of the student in the filtered student list to edit the remark + * @param remark of the student to be updated to */ public RemarkCommand(Index index, String remark) { requireAllNonNull(index, remark); @@ -223,11 +223,11 @@ If you are stuck, check out the sample ## Add `Remark` to the model -Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of person data. We achieve that by working with the `Person` model. Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the person’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a person. +Now that we have all the information that we need, let’s lay the groundwork for propagating the remarks added into the in-memory storage of student data. We achieve that by working with the `Student` model. Each field in a Student is implemented as a separate class (e.g. a `Name` object represents the student’s name). That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a student. ### Add a new `Remark` class -Create a new `Remark` in `seedu.address.model.person`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code. +Create a new `Remark` in `seedu.address.model.student`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code. A copy-paste and search-replace later, you should have something like [this](https://github.com/se-edu/addressbook-level3/commit/4516e099699baa9e2d51801bd26f016d812dedcc#diff-41bb13c581e280c686198251ad6cc337cd5e27032772f06ed9bf7f1440995ece). Note how `Remark` has no constrains and thus does not require input validation. @@ -238,11 +238,11 @@ Let’s change `RemarkCommand` and `RemarkCommandParser` to use the new `Remark` ## Add a placeholder element for remark to the UI -Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get some placeholder text to show up for each person. +Without getting too deep into `fxml`, let’s go on a 5 minute adventure to get some placeholder text to show up for each student. -Simply add the following to [`seedu.address.ui.PersonCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-639834f1e05afe2276a86372adf0fe5f69314642c2d93cfa543d614ce5a76688). +Simply add the following to [`seedu.address.ui.StudentCard`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-639834f1e05afe2276a86372adf0fe5f69314642c2d93cfa543d614ce5a76688). -**`PersonCard.java`:** +**`StudentCard.java`:** ``` java @FXML @@ -252,9 +252,9 @@ private Label remark; `@FXML` is an annotation that marks a private or protected field and makes it accessible to FXML. It might sound like Greek to you right now, don’t worry — we will get back to it later. -Then insert the following into [`main/resources/view/PersonListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-d44c4f51c24f6253c277a2bb9bc440b8064d9c15ad7cb7ceda280bca032efce9). +Then insert the following into [`main/resources/view/StudentListCard.fxml`](https://github.com/se-edu/addressbook-level3/commit/850b78879582f38accb05dd20c245963c65ea599#diff-d44c4f51c24f6253c277a2bb9bc440b8064d9c15ad7cb7ceda280bca032efce9). -**`PersonListCard.fxml`:** +**`StudentListCard.fxml`:** ``` xml