diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 5a4f00d6d4d..c9f9bb01cc6 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -219,6 +219,64 @@ check with the rest of the prior `Earnings` object, to ensure that there is no d * Step 6: `AddEarningsCommand` would then return a `CommandResult` to `LogicManager`, which would show the user that the new `Earnings` object have been successfully added. +=== Notes Features +==== Add Notes +The `addnote` command allows for tutors to add their notes into TutorAid. + +The format for the `addnote` command is as follows: + + addnote mod/ c/ + +*Overview* + +The add claim `add_earnings` mechanism is facilitated by `AddNotesCommand` and `AddNotesCommandParser`, taking in the +following input from the user: `Module_Code`, `Content`, which will construct `Notes` objects. + +.Add Note Command Sequence Diagram +##diagram to be added + +The `AddNotesCommand` implements `Parser` with the following operation: + +* `AddNotesCommandParser#parse()` - This operation will take in a `String` input from the user and create +individual objects based on the prefixes `mod/` and `c/`. The `String` value after the respective prefixes +will create the respective objects. A validation check will be done to ensure that the strings that are entered +by the user is entered correctly. If any of the strings entered are invalid, an error will be shown to the user to +enter the correct format of the respectives objects. + +** `code` would use `ParserUtil#parseModuleCode()` to ensure that the module code typed by the user is in the correct format of +CSXXXX. + +** `content` would use `ParserUtil#parseContent()` to ensure that the content typed in by the user is in not empty. + +* After validation of the individual objects, an `Notes` object would be created with the parameters `code` and `content`. + +* `AddNotesCommandParser` would then return a `AddNotesCommand` object with the parameter, `Notes` object. + +The following activity diagram summarizes what happens when a user executes a new command. + +##diagram to be added + +*Example Scenerio* + +* Step 1: The user enters `addnote mod/CS2103T c/Update Project` to add an note for teaching classes. +This adds an `Notes` object that the user has added to record what needs to be done for the class. + +* Step 2: `LogicManager` would use `AddressBookParser#parse()` to parse input from the user. + +* Step 3: `AddressBookParser` would match the command word given by the user with the correct command. In this example, +the given command is `addnote`, thus, `AddNotesCommandParser` object would be created with the user's input. + +* Step 4: `AddNotesCommandParser` performs a validation check on each of the respective objects through +`AddNotesCommandParser#parse()`. In this case, it would use `ParserUtil#parseModuleCode()` and `ParserUtil#parseContent()`. +It would then return a `AddNotesCommand` object with an `Notes` object. + +* Step 5: `LogicManager` would execute `AddNotesCommand#execute`. In this particular method, the `Notes` object will be +check with the rest of the prior `Notes` object, to ensure that there is no duplicate `Notes` object. If there are no similar +`Notes` object with the same parameters created previously, it would then be added into the notes list. + +* Step 6: `AddNotesCommand` would then return a `CommandResult` to `LogicManager`, which would show the user that the new +`Notes` object have been successfully added. + // tag::undoredo[] === [Proposed] Undo/Redo feature diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 020b62cb588..495d2202069 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -243,6 +243,36 @@ Examples: * `claim_earnings k/CS2103T, c/CS1231` +=== Notes +==== Add Note: `addnote` + +Adds Note to the list of notes. + +Format: `addnote mod/MODULE_CODE c/CONTENT` + +Examples: + +* `addnote mod/CS2103T c/Check for project submission date` + +==== Edit Note: `update_earnings` + +Update Note in the list of notes. + +Format: `editnote [index] mod/MODULE_CODE c/CONTENT` + +Examples: + +* `editnote 1 mod/CS2103T` +* `editnote 1 c/check for meeting time` +* `editnote 1 mod/CS2103 c/update project content` + +==== Delete Note: `deletenote` + +Delete Note in the list of notes. + +Format: `deletenote [index]` + +Examples: + +* `deletenote 1` + // end::delete[] === Clearing all entries : `clear`