Removed console outputs from CalorieCount.java

This commit is contained in:
Fennel Kora 2022-12-02 12:20:53 -05:00
parent 900ee5e2d1
commit c381113042

View file

@ -13,16 +13,14 @@ public class CalorieCount {
inLine = inputReader.nextLine(); inLine = inputReader.nextLine();
if (!inLine.isEmpty()) { if (!inLine.isEmpty()) {
currentCals += Integer.parseInt(inLine); currentCals += Integer.parseInt(inLine);
System.out.printf("Current elf total is %d%n", currentCals);
} }
} while (!inLine.isEmpty() && inputReader.hasNext()); } while (!inLine.isEmpty() && inputReader.hasNext());
if (currentCals > maxCals) { if (currentCals > maxCals) {
maxCals = currentCals; maxCals = currentCals;
System.out.printf("New Max Cals: %d%n", maxCals);
} }
} }
System.out.printf("The large calories carried is: %d%n", maxCals); System.out.printf("The largest calories carried is: %d%n", maxCals);
} catch (IOException e) { } catch (IOException e) {
System.out.println("IOException"); System.out.println("IOException");
e.printStackTrace(); e.printStackTrace();