Skip to content

Commit 2b06355

Browse files
authored
Jesus therefore answered
Jesus therefore answered, "It is he to whom I will give this piece of bread when I have dipped it." So when he had dipped the piece of bread, he gave it to Judas, the son of Simon Iscariot. (John 13:26)
1 parent 4a7ab5e commit 2b06355

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

‎task12/task1219/Solution.java‎

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
package com.javarush.task.task12.task1219;
2+
3+
//Jesus therefore answered, "It is he to whom I will give this piece of bread when I have dipped it."
4+
//So when he had dipped the piece of bread, he gave it to Judas, the son of Simon Iscariot. (John 13:26)
5+
6+
/*
7+
Создаем человека
8+
*/
9+
10+
public class Solution {
11+
public static void main(String[] args) {
12+
13+
}
14+
15+
public interface Fly {
16+
public void fly();
17+
}
18+
19+
public interface Run {
20+
public void run();
21+
}
22+
23+
public interface Swim {
24+
public void swim();
25+
}
26+
27+
28+
public class Human implements Run, Swim {
29+
@Override
30+
public void run() {}
31+
@Override
32+
public void swim() {}
33+
}
34+
35+
public class Duck implements Fly, Swim, Run {
36+
@Override
37+
public void fly() {}
38+
@Override
39+
public void swim() {}
40+
@Override
41+
public void run() {}
42+
}
43+
44+
public class Penguin implements Swim, Run {
45+
@Override
46+
public void swim() {}
47+
@Override
48+
public void run() {}
49+
}
50+
51+
public class Airplane implements Fly, Run {
52+
@Override
53+
public void fly() {}
54+
@Override
55+
public void run() {}
56+
}
57+
}
58+
59+
60+
61+
/*
62+
Создаем человека
63+
Есть public интерфейсы Fly(летать), Run(бежать/ездить), Swim(плавать).
64+
Добавь эти интерфейсы классам Human(человек), Duck(утка), Penguin(пингвин), Airplane(самолет).
65+
66+
67+
Требования:
68+
1. Класс Solution должен содержать интерфейс Fly с одним методом fly().
69+
2. Класс Solution должен содержать интерфейс Run с одним методом run().
70+
3. Класс Solution должен содержать интерфейс Swim с одним методом swim().
71+
4. Человек должен уметь бегать и плавать.
72+
5. Утка должна уметь летать, плавать и бегать.
73+
6. Пингвин должен уметь плавать и бегать.
74+
7. Самолет должен уметь летать и ездить.
75+
76+
package com.javarush.task.task12.task1219;
77+
78+
Создаем человека
79+
80+
public class Solution {
81+
public static void main(String[] args) {
82+
83+
}
84+
85+
public interface Fly {
86+
public void fly();
87+
}
88+
89+
public interface Run {
90+
public void run();
91+
}
92+
93+
public interface Swim {
94+
public void swim();
95+
}
96+
97+
98+
public class Human {
99+
100+
}
101+
102+
public class Duck {
103+
104+
}
105+
106+
public class Penguin {
107+
108+
}
109+
110+
public class Airplane {
111+
112+
}
113+
}
114+
*/

0 commit comments

Comments
 (0)