-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDvdPlayer.java
More file actions
47 lines (35 loc) · 1005 Bytes
/
DvdPlayer.java
File metadata and controls
47 lines (35 loc) · 1005 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package FacadePattern;
public class DvdPlayer {
Amplifier amplifier;
public DvdPlayer(Amplifier amplifier) {
this.amplifier = amplifier;
}
public void on(){
System.out.println("Dvd Player is on");
}
public void off(){
System.out.println("Dvd Player is off");
}
public void eject(){
System.out.println("Dvd Player eject");
}
public void pause(){
System.out.println("Dvd Player pause");
}
public void play(String movie){
System.out.println("Dvd Player playing \"" + movie + "\"");
}
public void setSurroundSoundAudio(){
System.out.println("Dvd Player set surround sound audio");
this.amplifier.setSurroundSound();
}
public void setTwoChannelAudio(){
System.out.println("Dvd Player set two channel audio");
}
public void stop(){
System.out.println("Dvd Player stop");
}
public String toString(){
return "Dvd Player";
}
}