From a1d31ab7fc5899ab396f296a5b10c0a3210b3fde Mon Sep 17 00:00:00 2001 From: JPANZO Date: Mon, 7 Feb 2022 21:30:53 +0100 Subject: [PATCH] Production-Code for CDPlayer-Method [Louder] produced. --- src/main/java/device/cdPlayer/CDPlayer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/device/cdPlayer/CDPlayer.java b/src/main/java/device/cdPlayer/CDPlayer.java index 6cc7b77..f66c9d1 100644 --- a/src/main/java/device/cdPlayer/CDPlayer.java +++ b/src/main/java/device/cdPlayer/CDPlayer.java @@ -21,7 +21,11 @@ public class CDPlayer implements Device { @Override public void louder() { - + if(volume < 100) { + volume += 1; + } else { + volume = 100; + } } @Override @@ -31,7 +35,7 @@ public class CDPlayer implements Device { @Override public int getVolume() { - return 0; + return this.volume; } @Override