-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
28 lines (23 loc) · 816 Bytes
/
Main.java
File metadata and controls
28 lines (23 loc) · 816 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
package week4_2;
// Main.java
public class Main {
public static void main(String[] args) {
// Test AudioPlayer
MediaPlayer audioPlayer = new AudioPlayer();
audioPlayer.play("Song A");
audioPlayer.pause();
audioPlayer.stop();
System.out.println("-----------------------------");
// Test VideoPlayer
MediaPlayer videoPlayer = new VideoPlayer();
videoPlayer.play("Movie B");
videoPlayer.pause();
videoPlayer.stop();
System.out.println("-----------------------------");
// Test StreamingPlayer
MediaPlayer streamingPlayer = new StreamingPlayer();
streamingPlayer.play("Live Stream C");
streamingPlayer.pause();
streamingPlayer.stop();
}
}