From 31e51d9a3f6d42ee5d5e4c5c73b8aec15f8d3e55 Mon Sep 17 00:00:00 2001 From: JPANZO Date: Tue, 15 Feb 2022 19:21:01 +0100 Subject: [PATCH] changes in the Interface 0.2. --- src/main/java/device/Device.java | 7 ++++++- src/main/java/device/cdPlayer/CDPlayer.java | 7 ++++++- src/main/java/device/radioPlayer/RadioPlayer.java | 8 +++++++- src/main/java/device/usbPlayer/UsbPlayer.java | 8 +++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/main/java/device/Device.java b/src/main/java/device/Device.java index 47162d9..66a376d 100644 --- a/src/main/java/device/Device.java +++ b/src/main/java/device/Device.java @@ -7,9 +7,14 @@ public interface Device { int getVolume(); void next(); void prev(); + //get deviceName, Album and current Item String getInfoText(); + //get a list of public methods String[] getOptions(); - String chooseOption(); + //get an Item of the Album + String chooseItem(int itemNr); + // get the actual album + String getItemList(); String play(); } diff --git a/src/main/java/device/cdPlayer/CDPlayer.java b/src/main/java/device/cdPlayer/CDPlayer.java index b332775..e7c0ec5 100644 --- a/src/main/java/device/cdPlayer/CDPlayer.java +++ b/src/main/java/device/cdPlayer/CDPlayer.java @@ -73,7 +73,12 @@ public class CDPlayer implements Device { } @Override - public String chooseOption() { + public String chooseItem(int itemNr) { + return null; + } + + @Override + public String getItemList() { return null; } diff --git a/src/main/java/device/radioPlayer/RadioPlayer.java b/src/main/java/device/radioPlayer/RadioPlayer.java index 6a6363d..f491dbc 100644 --- a/src/main/java/device/radioPlayer/RadioPlayer.java +++ b/src/main/java/device/radioPlayer/RadioPlayer.java @@ -157,10 +157,16 @@ public class RadioPlayer implements Device { } @Override - public String chooseOption() { + public String chooseItem(int itemNr) { return null; } + @Override + public String getItemList() { + return null; + } + + @Override public String play() { if (regionPlaylist.contains(playedStation)) diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index 1856068..da599bc 100644 --- a/src/main/java/device/usbPlayer/UsbPlayer.java +++ b/src/main/java/device/usbPlayer/UsbPlayer.java @@ -151,10 +151,16 @@ public class UsbPlayer implements Device { } @Override - public String chooseOption() { + public String chooseItem(int itemNr) { return null; } + @Override + public String getItemList() { + return null; + } + + @Override public String play() { String result = "USB : ";