-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathch11_prac6.java
More file actions
49 lines (35 loc) · 903 Bytes
/
Copy pathch11_prac6.java
File metadata and controls
49 lines (35 loc) · 903 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
48
49
interface tvremote{
public void volume();
public void changechannel();
}
interface smarttvremote extends tvremote{
public void gamebutton();
public void netflix();
}
class remote implements smarttvremote{
@Override
public void volume() {
System.out.println("volume button");
}
@Override
public void changechannel() {
System.out.println("channel change");
}
@Override
public void gamebutton() {
System.out.println("game button");
}
@Override
public void netflix() {
System.out.println("netlix button");
}
}
class ch11_prac6{
public static void main(String[] args) {
remote r = new remote();
r.changechannel();
r.gamebutton();
r.volume();
r.netflix();
}
}