From 24127917db8c0906210ab7abfa0a10669a12440a Mon Sep 17 00:00:00 2001 From: lamchenghou Date: Tue, 14 Nov 2023 12:20:43 +0800 Subject: [PATCH 1/2] Add final changes to DG --- docs/DeveloperGuide.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index a8705423131..3ca9ac30c0d 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1,7 +1,7 @@ --- - layout: default.md - title: "Developer Guide" - pageNav: 3 +layout: default.md +title: "Developer Guide" +pageNav: 3 --- @@ -64,6 +64,7 @@ note-taking system will assist you in organising your important information you - 10.2 [Redesigning the UI](#10-2-redesigning-the-ui) 11. [Acknowledgements](#11-acknowledgements) +
--- @@ -210,8 +211,7 @@ The `SeplendidModel` component, ### 4.5 Storage Component -**API -** : [`Storage.java`](https://github.com/AY2324S1-CS2103T-W10-2/tp/blob/master/src/main/java/seedu/address/storage/Storage.java) +**API** : [`Storage.java`](https://github.com/AY2324S1-CS2103T-W10-2/tp/blob/master/src/main/java/seedu/address/storage/Storage.java) @@ -253,7 +253,7 @@ The below diagram gives a high-level overview on how the `SeplendidParser` parse ### 5.2 Listing of Courses, Universities and Notes -**Overview** +**Overview** \ The `list` command generates a list of courses and universities' sample data. This allows the viewing of all the courses. @@ -287,7 +287,7 @@ Each data type has to be specified to ensure organisation of sample data. ### 5.3 Adding of Courses, Universities and Notes -**Overview** +**Overview** \ The `add` command allows for the adding of new courses, universities and notes. This allows the creation of new datatypes. @@ -557,7 +557,7 @@ The following further describes our target users: * prefers typing to mouse interactions * is reasonably comfortable using CLI apps -**Value proposition** +**Value proposition:** \ SEPlendid aims to provide an advanced search, allowing users to search for mappings by various attributes such as partner universities' course names, and NUS course codes. We aim to also include features such as the ability to contribute course mappings, and note-taking. @@ -596,8 +596,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli | `* *` | student | delete my notes | remove my note | | `* ` | student | update the list of my notes | edit any mistakes or update new information | | `* ` | student | tag my notes | to organise my notes | - -*{More to be added}* +| `* ` | student | search for my notes based on the tag | to find my notes based on the tag | +| `* ` | student | clear the tags for my notes | to organise my notes based on tags |
From 34f4398cc890c87404eb27182d181573e4f3d379 Mon Sep 17 00:00:00 2001 From: lamchenghou Date: Tue, 14 Nov 2023 12:25:38 +0800 Subject: [PATCH 2/2] Final touches --- .../address/logic/SeplendidLogicManager.java | 1 - .../localcourse/LocalCourseAddCommand.java | 7 +++ .../localcourse/LocalCourseDeleteCommand.java | 7 +++ .../localcourse/LocalCourseListCommand.java | 7 +++ .../mapping/MappingSearchCommand.java | 7 +++ .../commands/mapping/MappingSortCommand.java | 7 +++ .../address/logic/parser/SeplendidParser.java | 43 +++++++++---------- .../logic/commands/CommandTestUtil.java | 2 +- .../university/UniversitySortCommandTest.java | 3 -- 9 files changed, 57 insertions(+), 27 deletions(-) diff --git a/src/main/java/seedu/address/logic/SeplendidLogicManager.java b/src/main/java/seedu/address/logic/SeplendidLogicManager.java index e7c013ff445..2fbdc6bcbe2 100644 --- a/src/main/java/seedu/address/logic/SeplendidLogicManager.java +++ b/src/main/java/seedu/address/logic/SeplendidLogicManager.java @@ -39,7 +39,6 @@ public class SeplendidLogicManager implements SeplendidLogic { // Note, during morphing Storage handles both ab3 and SEPlendid. // On the other hand, SEPlendid has its own LogicManager. - // TBD: remove this developer's note. private final SeplendidModel model; private final Storage storage; private final SeplendidParser seplendidParser; diff --git a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseAddCommand.java b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseAddCommand.java index a46e603d350..8567963c271 100644 --- a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseAddCommand.java +++ b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseAddCommand.java @@ -32,6 +32,13 @@ public LocalCourseAddCommand(LocalCourse localCourse) { localCourseToAdd = localCourse; } + /** + * Perfoms the Addition of the local course. + * + * @param seplendidModel {@code SeplendidModel} which the command should operate on. + * @return {@code CommandResult} that describes the result of the deletion. + * @throws CommandException If an error occurs during the deletion. + */ @Override public CommandResult execute(SeplendidModel seplendidModel) throws CommandException { requireNonNull(seplendidModel); diff --git a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseDeleteCommand.java b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseDeleteCommand.java index 20aa80ae523..41adb9873dd 100644 --- a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseDeleteCommand.java +++ b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseDeleteCommand.java @@ -36,6 +36,13 @@ public LocalCourseDeleteCommand(LocalCode localCode) { this.localCodeToDelete = localCode; } + /** + * Perfoms the deletion of the local course. + * + * @param seplendidModel {@code SeplendidModel} which the command should operate on. + * @return {@code CommandResult} that describes the result of the deletion. + * @throws CommandException If an error occurs during the deletion. + */ @Override public CommandResult execute(SeplendidModel seplendidModel) throws CommandException { requireNonNull(seplendidModel); diff --git a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseListCommand.java b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseListCommand.java index 7e0ab56ca03..61e931a5ecb 100644 --- a/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseListCommand.java +++ b/src/main/java/seedu/address/logic/commands/localcourse/LocalCourseListCommand.java @@ -15,6 +15,13 @@ public class LocalCourseListCommand extends LocalCourseCommand { public static final String MESSAGE_SUCCESS = "Listed all local courses"; + /** + * Lists all local courses in the LocalCourseCatalogue, by applying a show-all predicate. + * + * @param seplendidModel {@code SeplendidModel} which the command should operate on. + * @return CommandResult indicating success of execution. + * @throws CommandException On error. + */ @Override public CommandResult execute(SeplendidModel seplendidModel) throws CommandException { requireNonNull(seplendidModel); diff --git a/src/main/java/seedu/address/logic/commands/mapping/MappingSearchCommand.java b/src/main/java/seedu/address/logic/commands/mapping/MappingSearchCommand.java index f103072af41..285c8993f95 100644 --- a/src/main/java/seedu/address/logic/commands/mapping/MappingSearchCommand.java +++ b/src/main/java/seedu/address/logic/commands/mapping/MappingSearchCommand.java @@ -29,6 +29,13 @@ public MappingSearchCommand(MappingAttributeContainsKeywordPredicate predicate) this.predicate = predicate; } + /** + * Searches the mapping list and returns a CommandResult. + * + * @param seplendidModel {@code SeplendidModel} which the command should operate on. + * @return {@code CommandResult} that describes changes made when command execute runs successfully. + * @throws CommandException If an error occurs during command execution. + */ @Override public CommandResult execute(SeplendidModel seplendidModel) throws CommandException { requireNonNull(seplendidModel); diff --git a/src/main/java/seedu/address/logic/commands/mapping/MappingSortCommand.java b/src/main/java/seedu/address/logic/commands/mapping/MappingSortCommand.java index 9419811abee..e97eb5ad74a 100644 --- a/src/main/java/seedu/address/logic/commands/mapping/MappingSortCommand.java +++ b/src/main/java/seedu/address/logic/commands/mapping/MappingSortCommand.java @@ -29,6 +29,13 @@ public MappingSortCommand(MappingComparatorByAttribute mappingComparator) { this.mappingComparator = mappingComparator; } + /** + * Sorts the mapping list and returns a CommandResult. + * + * @param seplendidModel {@code SeplendidModel} which the command should operate on. + * @return {@code CommandResult} that describes changes made when command execute runs successfully. + * @throws CommandException If an error occurs during command execution. + */ @Override public CommandResult execute(SeplendidModel seplendidModel) throws CommandException { requireNonNull(seplendidModel); diff --git a/src/main/java/seedu/address/logic/parser/SeplendidParser.java b/src/main/java/seedu/address/logic/parser/SeplendidParser.java index 3b560d4d47b..beb49f53887 100644 --- a/src/main/java/seedu/address/logic/parser/SeplendidParser.java +++ b/src/main/java/seedu/address/logic/parser/SeplendidParser.java @@ -68,7 +68,6 @@ /** * Parses user input into the SEPlendid CLI. *

- * TBD: Add parsing for help command */ public class SeplendidParser { /** @@ -78,17 +77,17 @@ public class SeplendidParser { private static final String REGEX_GROUP_ACTION_WORD = "actionWord"; private static final String REGEX_GROUP_ARGUMENTS = "arguments"; private static final Pattern COMMAND_FORMAT_COMMAND = Pattern.compile(String.format( - "(?<%s>\\S+)", - REGEX_GROUP_COMMAND_WORD)); + "(?<%s>\\S+)", + REGEX_GROUP_COMMAND_WORD)); private static final Pattern COMMAND_FORMAT_COMMAND_ACTION = Pattern.compile(String.format( - "(?<%s>\\S+)\\s(?<%s>\\S+)", - REGEX_GROUP_COMMAND_WORD, - REGEX_GROUP_ACTION_WORD)); + "(?<%s>\\S+)\\s(?<%s>\\S+)", + REGEX_GROUP_COMMAND_WORD, + REGEX_GROUP_ACTION_WORD)); private static final Pattern COMMAND_FORMAT_COMMAND_ACTION_ARG = Pattern.compile(String.format( - "(?<%s>\\S+)\\s(?<%s>\\S+)\\s(?<%s>.*)", - REGEX_GROUP_COMMAND_WORD, - REGEX_GROUP_ACTION_WORD, - REGEX_GROUP_ARGUMENTS)); + "(?<%s>\\S+)\\s(?<%s>\\S+)\\s(?<%s>.*)", + REGEX_GROUP_COMMAND_WORD, + REGEX_GROUP_ACTION_WORD, + REGEX_GROUP_ARGUMENTS)); private static final Logger logger = SeplendidLogsCenter.getLogger(SeplendidParser.class); /** @@ -142,22 +141,22 @@ public Command parseCommandOnly(String userInput) throws ParseException { switch (commandWord) { case LocalCourseCommand.COMMAND_WORD: throw new ParseException( - UsageMessage.LOCALCOURSE.toString()); + UsageMessage.LOCALCOURSE.toString()); case PartnerCourseCommand.COMMAND_WORD: throw new ParseException( - UsageMessage.PARTNERCOURSE.toString()); + UsageMessage.PARTNERCOURSE.toString()); case NoteCommand.COMMAND_WORD: throw new ParseException( - UsageMessage.NOTE.toString()); + UsageMessage.NOTE.toString()); case UniversityCommand.COMMAND_WORD: throw new ParseException( - UsageMessage.UNIVERSITY.toString()); + UsageMessage.UNIVERSITY.toString()); case MappingCommand.COMMAND_WORD: throw new ParseException( - UsageMessage.MAPPING.toString()); + UsageMessage.MAPPING.toString()); default: throw new ParseException( - UsageMessage.HELP.toString()); + UsageMessage.HELP.toString()); } } @@ -246,7 +245,7 @@ public Command parseCommandActionArg(String userInput) throws ParseException { } private LocalCourseCommand getLocalCourseCommandWithArg(String userInput, String actionWord, String arguments) - throws ParseException { + throws ParseException { switch (actionWord) { case LocalCourseAddCommand.ACTION_WORD: return new LocalCourseAddCommandParser().parse(arguments); @@ -269,7 +268,7 @@ private LocalCourseCommand getLocalCourseCommandWithArg(String userInput, String } private LocalCourseCommand getLocalCourseCommandWithoutArg(String userInput, String actionWord) - throws ParseException { + throws ParseException { if (actionWord.equals(LocalCourseListCommand.ACTION_WORD)) { return new LocalCourseListCommand(); } @@ -292,7 +291,7 @@ private LocalCourseCommand getLocalCourseCommandWithoutArg(String userInput, Str } private PartnerCourseCommand getPartnerCourseCommandWithArg(String userInput, String actionWord, String arguments) - throws ParseException { + throws ParseException { switch (actionWord) { case PartnerCourseAddCommand.ACTION_WORD: return new PartnerCourseAddCommandParser().parse(arguments); @@ -315,7 +314,7 @@ private PartnerCourseCommand getPartnerCourseCommandWithArg(String userInput, St } private PartnerCourseCommand getPartnerCourseCommandWithoutArg(String userInput, String actionWord) - throws ParseException { + throws ParseException { if (actionWord.equals(PartnerCourseListCommand.ACTION_WORD)) { return new PartnerCourseListCommand(); } @@ -355,7 +354,7 @@ private UniversityCommand getUniversityCommandWithoutArg(String userInput, Strin } private UniversityCommand getUniversityCommandWithArg(String userInput, String actionWord, String arguments) - throws ParseException { + throws ParseException { if (actionWord.equals(UniversitySearchCommand.ACTION_WORD)) { return new UniversitySearchCommandParser().parse(arguments); } @@ -412,7 +411,7 @@ private MappingCommand getMappingCommandWithoutArg(String userInput, String acti } private NoteCommand getNoteCommandWithArg(String userInput, String actionWord, String arguments) - throws ParseException { + throws ParseException { switch (actionWord) { case NoteAddCommand.ACTION_WORD: return new NoteAddCommandParser().parse(arguments); diff --git a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java index e61fd3d7013..ed79e63667a 100644 --- a/src/test/java/seedu/address/logic/commands/CommandTestUtil.java +++ b/src/test/java/seedu/address/logic/commands/CommandTestUtil.java @@ -64,7 +64,7 @@ public static void assertSeplendidCommandFailure(Command command, SeplendidModel // we are unable to defensively copy the model for comparison later, so we can // only do so by copying its components. - // TBD: To other developers: please add on other data types appropriately + // To other developers: please add on other data types appropriately LocalCourseCatalogue expectedLocalCourseCatalogue = new LocalCourseCatalogue(actualModel.getLocalCourseCatalogue()); List expectedFilteredLocalCourseList = new ArrayList<>(actualModel.getFilteredLocalCourseList()); diff --git a/src/test/java/seedu/address/logic/commands/university/UniversitySortCommandTest.java b/src/test/java/seedu/address/logic/commands/university/UniversitySortCommandTest.java index fc4de507986..19f50f3ac5b 100644 --- a/src/test/java/seedu/address/logic/commands/university/UniversitySortCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/university/UniversitySortCommandTest.java @@ -79,8 +79,5 @@ public void equals() { // null -> returns false assertFalse(universitySortCommandByUniversityName.equals(null)); - // different task -> returns false - // TBD when country for university is ready. - } }