|
|
@ -2,6 +2,7 @@ import device.Device; |
|
|
|
import device.cdPlayer.CD; |
|
|
|
import device.cdPlayer.CDPlayer; |
|
|
|
import device.radioPlayer.RadioPlayer; |
|
|
|
import device.usbPlayer.USB_Stick; |
|
|
|
import device.usbPlayer.UsbPlayer; |
|
|
|
|
|
|
|
import java.io.FileReader; |
|
|
@ -56,7 +57,7 @@ public class BordComputer { |
|
|
|
return null; |
|
|
|
} |
|
|
|
public void meetAllPreconditionForPlay(){ |
|
|
|
|
|
|
|
if(activeDevice instanceof CDPlayer) { |
|
|
|
String[] audioPlayList = new String[]{"Audio 01", "Audio 02", "Audio 03", "Audio 04", "Audio 05"}; |
|
|
|
CD audioCD1 = new CD("Audio", "PopMusic", audioPlayList, "XAc20044"); |
|
|
|
CD audioCD2 = new CD("Audio", "RockMusic", audioPlayList, "BLXPP78"); |
|
|
@ -69,6 +70,14 @@ public class BordComputer { |
|
|
|
cdPlayer.setCD(cdPlayer.getCdWechseler().getCDList().get(0)); |
|
|
|
activeDevice = cdPlayer; |
|
|
|
} |
|
|
|
if(activeDevice instanceof UsbPlayer) { |
|
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
|
activeDevice = up1; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setActiveDevice(Device activeDevice) { |
|
|
|
this.activeDevice = activeDevice; |
|
|
|