From 4440235c0c68437cbda4a62a5d68c18400992aff Mon Sep 17 00:00:00 2001 From: JPANZO Date: Mon, 7 Feb 2022 21:54:28 +0100 Subject: [PATCH] Production-Code for CDPlayer-Method [Quieter] produced. --- src/main/java/device/cdPlayer/CDPlayer.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/device/cdPlayer/CDPlayer.java b/src/main/java/device/cdPlayer/CDPlayer.java index 1f5ea0e..f0b82a6 100644 --- a/src/main/java/device/cdPlayer/CDPlayer.java +++ b/src/main/java/device/cdPlayer/CDPlayer.java @@ -21,12 +21,20 @@ public class CDPlayer implements Device { @Override public void louder() { - + if(volume < 100) { + volume += 1; + } else { + volume = 100; + } } @Override public void quieter() { - + if(volume > 0) { + volume -= 1; + } else { + volume = 0; + } } @Override