-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSolution.java
More file actions
64 lines (45 loc) · 1.56 KB
/
Solution.java
File metadata and controls
64 lines (45 loc) · 1.56 KB
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
package com.javarush.task.task13.task1323;
//Who are you who judge another's servant? To his own lord he stands or falls.
//Yes, he will be made to stand, for God has power to make him stand. (Romans 14:4)
/*
Интерфейс Updatable в классе Screen
*/
public class Solution {
public static void main(String[] args) throws Exception {
}
interface Selectable {
void onSelect();
}
interface Updatable extends Selectable {
void refresh();
}
class Screen implements Updatable {
public void refresh() {}
public void onSelect() {}
}
}
/*
Интерфейс Updatable в классе Screen
Реализовать интерфейс Updatable в классе Screen.
Требования:
1. Интерфейс Updatable должен наследовать(extends) интерфейс Selectable.
2. Класс Screen должен реализовывать(implements) интерфейс Updatable.
3. В классе Screen должен быть реализован метод onSelect интерфейса Selectable.
4. В классе Screen должен быть реализован метод refresh интерфейса Updatable.
package com.javarush.task.task13.task1323;
*
Интерфейс Updatable в классе Screen
*
public class Solution {
public static void main(String[] args) throws Exception {
}
interface Selectable {
void onSelect();
}
interface Updatable extends Selectable {
void refresh();
}
class Screen {
}
}
*/