From d280ed713c39020725d6759e99613f31735f5633 Mon Sep 17 00:00:00 2001 From: lordgareth10 <51813599+lordgareth10@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:36:22 +0800 Subject: [PATCH 1/2] Bug Fixes: Corrected error messages --- src/main/java/seedu/bookbuddy/Ui.java | 4 ++++ .../java/seedu/bookbuddy/bookdetailsmodifier/BookFind.java | 2 +- .../bookbuddy/parser/parsercommands/ParserRemoveGenre.java | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/bookbuddy/Ui.java b/src/main/java/seedu/bookbuddy/Ui.java index 71caccc1ac..959e2a0ec3 100644 --- a/src/main/java/seedu/bookbuddy/Ui.java +++ b/src/main/java/seedu/bookbuddy/Ui.java @@ -146,6 +146,10 @@ public static void printLabelFound(ArrayList bookLabel) { public static void printNoLabelFound(){ System.out.println("oops there are no books stored under this label..."); } + + public static void printNoAuthorFound(){ + System.out.println("oops there are no books written by this author..."); + } public static void printRateFound(ArrayList bookRate) { for (int i = 0; i < bookRate.size(); i++) { System.out.println(i + 1 + ". " + bookRate.get(i)); diff --git a/src/main/java/seedu/bookbuddy/bookdetailsmodifier/BookFind.java b/src/main/java/seedu/bookbuddy/bookdetailsmodifier/BookFind.java index 8f665f1026..2ca117f9e8 100644 --- a/src/main/java/seedu/bookbuddy/bookdetailsmodifier/BookFind.java +++ b/src/main/java/seedu/bookbuddy/bookdetailsmodifier/BookFind.java @@ -194,7 +194,7 @@ public static void findAuthor(BookList bookList, String input) { } } if (bookAuthor.isEmpty()){ - Ui.printNoLabelFound(); + Ui.printNoAuthorFound(); } else { Ui.printLine(); System.out.println("books written by [" + input.toLowerCase() + "] :"); diff --git a/src/main/java/seedu/bookbuddy/parser/parsercommands/ParserRemoveGenre.java b/src/main/java/seedu/bookbuddy/parser/parsercommands/ParserRemoveGenre.java index 7445836308..f906c60317 100644 --- a/src/main/java/seedu/bookbuddy/parser/parsercommands/ParserRemoveGenre.java +++ b/src/main/java/seedu/bookbuddy/parser/parsercommands/ParserRemoveGenre.java @@ -23,7 +23,7 @@ static void parseRemoveGenre(BookList books, String[] inputArray) { int index; assert inputArray.length == 2 : "Command requires additional arguments"; Exceptions.validateCommandArguments(inputArray, 2, "The remove " + - "Command requires a book index"); + "Command requires a book genre"); try { index = Integer.parseInt(inputArray[1].trim()); String genre = books.genreList.getGenre(index); From ca5e9cf60fa149184dcee6f15b6db5e742c182ea Mon Sep 17 00:00:00 2001 From: lordgareth10 <51813599+lordgareth10@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:39:51 +0800 Subject: [PATCH 2/2] Update PPP --- docs/team/lordgareth10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/team/lordgareth10.md b/docs/team/lordgareth10.md index d8323382fb..87c0f2c9a5 100644 --- a/docs/team/lordgareth10.md +++ b/docs/team/lordgareth10.md @@ -26,9 +26,9 @@ Link should direct to my code contributions. If not, enter the link and search f ### Enhancement to existing features 1. Created Utilities package for getting and converting DateTime to Strings ([PR #146](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/146)) -2. Reformat BookList to check allow checking and handling of duplicate books and authors ([PR #169](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/169) +2. Reformat BookList to allow checking and handling of duplicate books and authors ([PR #169](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/169) 3. Added assertions and logging to the codebase for features including Author ([PR #168](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/168) -4. Added JUnit Test cases for author feature and BookList methods ([PR #169](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/169)), ([PR #17](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/17)) +4. Added JUnit Test cases for Author class and BookList methods ([PR #169](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/169)), ([PR #17](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/17)) ### Contributions to UG 1. Added UG documentation for all features that I implemented ([PR #171](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/171)), ([PR #154](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/154))([PR #95](https://github.com/AY2324S2-CS2113-F15-4/tp/pull/95))