-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAAAAQ_interface.java
92 lines (69 loc) · 1.51 KB
/
AAAAQ_interface.java
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
class phone
{
public void call()
{
System.out.println("make a nokia phone call");
}
public void sms()
{
System.out.println("sed nokia sms");
}
}
interface Icamera
{
public void click();
public void record();
}
interface Imusicplayer
{
public void play();
public void pause();
public void stop();
}
class smartphone extends phone implements Icamera,Imusicplayer
{
public void videocall()
{
System.out.println("make a video call through smartphone");
}
public void click()
{
System.out.println("click to record");
}
public void record()
{
System.out.println("click to record");
}
public void play()
{
System.out.println("play the song");
}
public void pause()
{
System.out.println("pause the song");
}
public void stop()
{
System.out.println("stop playing the song");
}
}
public class AAAAQ_interface
{
public static void main(String [] arg)
{
smartphone s = new smartphone();
phone p = s;
Icamera c = s;
Imusicplayer mp = s;
p.call();
p.sms();
System.out.println();
c.click();
c.record();
System.out.println();
mp.play();
mp.pause();
mp.stop();
System.out.println();
}
}