Skip to content

Commit

Permalink
Merge pull request #214 from lordgareth10/master
Browse files Browse the repository at this point in the history
Bug Fixes: Corrected error messages
  • Loading branch information
lordgareth10 authored Apr 15, 2024
2 parents b8abbe3 + ca5e9cf commit 1d750b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/team/lordgareth10.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/seedu/bookbuddy/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ public static void printLabelFound(ArrayList<BookMain> 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<BookMain> bookRate) {
for (int i = 0; i < bookRate.size(); i++) {
System.out.println(i + 1 + ". " + bookRate.get(i));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() + "] :");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1d750b2

Please sign in to comment.