From a7a2266c0ff86acc572d0db9cabea8ad0a9b277d Mon Sep 17 00:00:00 2001 From: Emilie Date: Mon, 25 Sep 2023 14:56:51 -0400 Subject: [PATCH] Add else block to show what will happen if we get a drink item! Signed-off-by: Emilie --- .../bnymellon/codekatas/coffeeshopkata/CoffeeShopOrder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coffee-shop-kata/jdk8/src/main/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopOrder.java b/coffee-shop-kata/jdk8/src/main/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopOrder.java index 89b772a..538682f 100644 --- a/coffee-shop-kata/jdk8/src/main/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopOrder.java +++ b/coffee-shop-kata/jdk8/src/main/java/bnymellon/codekatas/coffeeshopkata/CoffeeShopOrder.java @@ -121,6 +121,9 @@ else if (item instanceof Donut) Donut donut = (Donut) item; foodItems.add(donut.getDonutType() + " donut"); } + else { + // it is a beverage, do nothing! + } } return foodItems; }