-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterfaceImplementation.java
More file actions
36 lines (35 loc) · 947 Bytes
/
InterfaceImplementation.java
File metadata and controls
36 lines (35 loc) · 947 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
interface wifi{
void connecte();
void disconnect();
}
interface recorder{
default void record(){
System.out.println("The the recorder is recording in 4k");
}
void stopRecording();
}
class Phone{
void call(){
System.out.println("The call is connected");
}
}
class SmartPhone extends Phone implements wifi, recorder{
public void connecte(){
System.out.println("The wifi is connected to the XYZ network");
}
public void disconnect(){
System.out.println("The network is disconnected");
}
public void record(){
System.out.println("The the recorder is recording vedio in 4k and sound in mp4");
}
public void stopRecording(){
System.out.println("The recorder has stopped recording");
}
}
public class InterfaceImplementation {
public static void main(String[] args) {
SmartPhone obj = new SmartPhone();
obj.record();
}
}