-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStereo.java
More file actions
31 lines (25 loc) · 772 Bytes
/
Stereo.java
File metadata and controls
31 lines (25 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package CommandPattern.BasicRemote;
public class Stereo {
public String location;
public Stereo(String location){
this.location = location;
}
public void on() {
System.out.println(location + " stereo is on");
}
public void off() {
System.out.println(location + " stereo is off");
}
public void setCD() {
System.out.println(location + " stereo is set for CD input");
}
public void setDVD() {
System.out.println(location + " stereo is set for DVD input");
}
public void setRadio() {
System.out.println(location + " stereo is set for Radio");
}
public void setVolume(int volume) {
System.out.println(location + " stereo volume is set to " + volume);
}
}