From 1d5a72debbfe8d1a9b7d9df27eb3e378309e18b4 Mon Sep 17 00:00:00 2001 From: sahar Date: Mon, 7 Feb 2022 19:45:23 +0100 Subject: [PATCH] Vars and setters and getters --- src/main/java/device/usbPlayer/UsbPlayer.java | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index 87b63ab..ad187e8 100644 --- a/src/main/java/device/usbPlayer/UsbPlayer.java +++ b/src/main/java/device/usbPlayer/UsbPlayer.java @@ -2,9 +2,50 @@ package device.usbPlayer; import device.Device; +import java.util.ArrayList; + public class UsbPlayer implements Device { - private int Lautstaerke = 0; + private ArrayList Playlist = new ArrayList(); + private String playTrack = ""; + private Boolean isConnected; + private Boolean isDefect; + int Lautstaerke = 0; + + //*********setters und getters******** + public ArrayList getPlaylist() { + return Playlist; + } + + public void setPlaylist(ArrayList playlist) { + Playlist = playlist; + } + + public Boolean getDefect() { + return isDefect; + } + + public void setDefect(Boolean defect) { + isDefect = defect; + } + + + public Boolean getConnected() { + return isConnected; + } + + public void setConnected(Boolean connected) { + isConnected = connected; + } + + public String getPlayTrack() { + return playTrack; + } + + public void setPlayTrack(String playTrack) { + this.playTrack = playTrack; + } + public void setLautstaerke(int ls) { if (ls <= 100) { @@ -24,7 +65,7 @@ public class UsbPlayer implements Device { Lautstaerke = 100; } } - + //*********setters und getters******** @Override public void quieter() { if(Lautstaerke > 0) {