-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path_101_TelePhone_SmartPhone.java
More file actions
36 lines (36 loc) · 1021 Bytes
/
_101_TelePhone_SmartPhone.java
File metadata and controls
36 lines (36 loc) · 1021 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
class TelePhone{
void ring(){
System.out.println("Brrrr...");
}
void lift(){
System.out.println("Moshi Moshi...");
}
void disconnect(){
System.out.println("Damare! Kono baba!");
}
}
class SmartPhone extends TelePhone{
void playMusic(){
System.out.println("Sono chi no sadame... JoooooooooooJO!");
}
void takeSelfie(){
System.out.println("Who's the old man in the background?");
}
void goldenWind(){
System.out.println("It's like a burning sunrise\n(Ahi makareru makare pun pun kete)");
}
}
public class _101_TelePhone_SmartPhone {
public static void main(String[] args) {
TelePhone T = new SmartPhone();
T.ring();
// T.takeSelfie(); // errr.. no can do, only use T as a TelePhone
SmartPhone S = new SmartPhone();
S.ring();
S.lift();
S.disconnect();
S.playMusic();
S.takeSelfie();
S.goldenWind();
}
}