@ -5,7 +5,7 @@ public class CDPlayer implements Device {
public void louder() {
}
/*
@Override
public void quieter() {
@ -46,5 +46,4 @@ public class CDPlayer implements Device {
return null;
*/
@ -3,10 +3,7 @@ package device;
public interface Device {
void louder();
void quieter();
void quiter();
int getVolume();
void next();
void prev();
@ -15,5 +12,5 @@ public interface Device {
void chooseOption(String opt);
String play();
@ -19,12 +19,15 @@ public class RadioPlayer implements Device {
Lautstaerke = 100;
if(Lautstaerke > 0) {
Lautstaerke -= 1;
} else {
Lautstaerke = 0;
public int getVolume() {
return 0;
@ -59,6 +62,4 @@ public class RadioPlayer implements Device {
public String play() {
@ -6,7 +6,7 @@ public class UsbPlayer implements Device{
@ -47,5 +47,4 @@ public class UsbPlayer implements Device{
@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class CDPlayerTest {
@Test
void louder() {
@ -41,4 +41,6 @@ class CDPlayerTest {
void play() {
@ -22,11 +22,15 @@ class RadioPlayerTest {
rp.louder();
assertThat(rp.getLautstaerke()).isEqualTo(100);
void quieter() {
rp.setLautstaerke(1);
rp.quieter();
assertThat(rp.getLautstaerke()).isEqualTo(0);
void getVolume() {
@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.*;
class UsbPlayerTest {
@ -41,4 +42,5 @@ class UsbPlayerTest {