diff --git a/docs/UserGuide.md b/docs/UserGuide.md index c709953dae..532b8c160b 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -15,11 +15,11 @@ Here are the list of commands you can use: 2. delete - Delete a bouquets 3. mybouquets - List current saved bouquets 4. info - Provide information on chosen flower -5. add /q /to - add flower to a bouquet. -6. remove /q /from - remove flower from a bouquet. +5. add /q /to - add flower to a bouquet +6. remove /q /from - remove flower from a bouquet 7. flowers - Shows a list of flowers that can be added into mybouquets 8. flowers - Shows a list of flowers associated with said occasion -9. occasion - Shows a list of occasions associated with available flowers. +9. occasion - Shows a list of occasions associated with available flowers 10. save - Saves a bouquet to an external .txt file 11. recommend - Recommends a bouquet based on the chosen occasion and colour 12. bye - Exits the programme diff --git a/src/main/java/florizz/core/Ui.java b/src/main/java/florizz/core/Ui.java index e77833a0a6..2cca602176 100644 --- a/src/main/java/florizz/core/Ui.java +++ b/src/main/java/florizz/core/Ui.java @@ -83,10 +83,12 @@ public void printAllBouquets(ArrayList bouquetList){ System.out.println(i++ + ". " + bouquet + " :"); HashMap flowerHashMap = bouquet.getFlowerHashMap(); totalPrice = 0; - if (!flowerHashMap.isEmpty()) { + if (!flowerHashMap.isEmpty() ) { for (Flower j : flowerHashMap.keySet()) { - System.out.println(" - " + flowerHashMap.get(j) + " x " + j.getFlowerName()); - totalPrice += (flowerHashMap.get(j) * j.getPrice()); + if (flowerHashMap.get(j) != 0) { + System.out.println(" - " + flowerHashMap.get(j) + " x " + j.getFlowerName()); + totalPrice += (flowerHashMap.get(j) * j.getPrice()); + } } System.out.println(" Total estimated price = $" + String.format("%.2f", (double) totalPrice)); } else { @@ -124,13 +126,13 @@ public void printHelpMessage() { System.out.println("2. delete - Delete a bouquets"); System.out.println("3. mybouquets - List current saved bouquets"); System.out.println("4. info - Provide information on chosen flower"); - System.out.println("5. add /q /to - add flower to a bouquet."); - System.out.println("6. remove /q /from - remove flower from a bouquet."); + System.out.println("5. add /q /to - add flower to a bouquet"); + System.out.println("6. remove /q /from - remove flower from a bouquet"); System.out.println("7. flowers - Shows a list of flowers that can be added into mybouquets"); System.out.println("8. flowers - Shows a list of flowers associated with said occasion"); - System.out.println("9. occasion - Shows a list of occasions associated with available flowers."); + System.out.println("9. occasion - Shows a list of occasions associated with available flowers"); System.out.println("10. save - Saves a bouquet to an external .txt file"); - System.out.println("11. recommend - Recommends a bouquet based on the chosen occasion and colour."); + System.out.println("11. recommend - Recommends a bouquet based on the chosen occasion and colour"); System.out.println("12. bye - Exits the programme"); printBreakLine(); } diff --git a/text-ui-test/ACTUAL.TXT b/text-ui-test/ACTUAL.TXT index 638d3f74f3..91624c2af1 100644 --- a/text-ui-test/ACTUAL.TXT +++ b/text-ui-test/ACTUAL.TXT @@ -14,13 +14,14 @@ Here are the list of commands you can use: 2. delete - Delete a bouquets 3. mybouquets - List current saved bouquets 4. info - Provide information on chosen flower -5. add /q /to - add flower to a bouquet. -6. remove /q /from - remove flower from a bouquet. +5. add /q /to - add flower to a bouquet +6. remove /q /from - remove flower from a bouquet 7. flowers - Shows a list of flowers that can be added into mybouquets 8. flowers - Shows a list of flowers associated with said occasion -9. occasion - Shows a list of occasions associated with available flowers. +9. occasion - Shows a list of occasions associated with available flowers 10. save - Saves a bouquet to an external .txt file -11. bye - Exits the programme +11. recommend - Recommends a bouquet based on the chosen occasion and colour +12. bye - Exits the programme ____________________________________________________________ What can I do for you? Enjoy your bouquet! Thank you for using Florizz diff --git a/text-ui-test/EXPECTED.TXT b/text-ui-test/EXPECTED.TXT index 638d3f74f3..91624c2af1 100644 --- a/text-ui-test/EXPECTED.TXT +++ b/text-ui-test/EXPECTED.TXT @@ -14,13 +14,14 @@ Here are the list of commands you can use: 2. delete - Delete a bouquets 3. mybouquets - List current saved bouquets 4. info - Provide information on chosen flower -5. add /q /to - add flower to a bouquet. -6. remove /q /from - remove flower from a bouquet. +5. add /q /to - add flower to a bouquet +6. remove /q /from - remove flower from a bouquet 7. flowers - Shows a list of flowers that can be added into mybouquets 8. flowers - Shows a list of flowers associated with said occasion -9. occasion - Shows a list of occasions associated with available flowers. +9. occasion - Shows a list of occasions associated with available flowers 10. save - Saves a bouquet to an external .txt file -11. bye - Exits the programme +11. recommend - Recommends a bouquet based on the chosen occasion and colour +12. bye - Exits the programme ____________________________________________________________ What can I do for you? Enjoy your bouquet! Thank you for using Florizz