-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
746f63b
commit c76b17f
Showing
22 changed files
with
347 additions
and
128 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
3.JavaMultithreading/src/com/javarush/task/task23/task2301/Solution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.javarush.task.task23.task2301; | ||
|
||
/* | ||
Запрети наследование | ||
*/ | ||
public class Solution { | ||
|
||
public final static class Listener { | ||
public void onMouseDown(int x, int y) { | ||
// Do something when the mouse down event occurs | ||
} | ||
|
||
public void onMouseUp(int x, int y) { | ||
// Do something when the mouse up event occurs | ||
} | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
3.JavaMultithreading/src/com/javarush/task/task23/task2301/Условие.jrtc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
taskKey="com.javarush.task.task23.task2301"\n\nЗапрети наследование | ||
|
||
Запрети наследование от класса Listener. | ||
|
||
|
||
Требования: | ||
1. Класс Listener должен быть создан внутри класса Solution. | ||
2. Класс Listener должен быть публичным. | ||
3. Класс Listener должен быть статическим. | ||
4. Должна быть запрещена возможность стать потомком класса Listener. | ||
|
||
|
21 changes: 21 additions & 0 deletions
21
3.JavaMultithreading/src/com/javarush/task/task23/task2302/Solution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.javarush.task.task23.task2302; | ||
|
||
/* | ||
Запрети переопределение | ||
*/ | ||
public class Solution { | ||
|
||
public static class Listener { | ||
public final void onMouseDown(int x, int y) { | ||
// Do something when the mouse down event occurs | ||
} | ||
|
||
public void onMouseUp(int x, int y) { | ||
// Do something when the mouse up event occurs | ||
} | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
3.JavaMultithreading/src/com/javarush/task/task23/task2302/Условие.jrtc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
taskKey="com.javarush.task.task23.task2302"\n\nЗапрети переопределение | ||
|
||
Запрети переопределение метода onMouseDown. | ||
|
||
|
||
Требования: | ||
1. Класс Listener должен быть создан внутри класса Solution. | ||
2. Класс Listener должен быть публичным. | ||
3. Метод onMouseDown должен быть публичным. | ||
4. Должна быть запрещена возможность переопределить метод onMouseDown. | ||
|
||
|
21 changes: 21 additions & 0 deletions
21
3.JavaMultithreading/src/com/javarush/task/task23/task2303/Solution.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.javarush.task.task23.task2303; | ||
|
||
/* | ||
Запрети создание экземпляров класса | ||
*/ | ||
public class Solution { | ||
|
||
public abstract static class Listener { | ||
public void onMouseDown(int x, int y) { | ||
// Do something when the mouse down event occurs | ||
} | ||
|
||
public void onMouseUp(int x, int y) { | ||
// Do something when the mouse up event occurs | ||
} | ||
} | ||
|
||
public static void main(String[] args) { | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
3.JavaMultithreading/src/com/javarush/task/task23/task2303/Условие.jrtc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
taskKey="com.javarush.task.task23.task2303"\n\nЗапрети создание экземпляров класса | ||
|
||
Запрети создание экземпляров класса Listener. | ||
|
||
|
||
Требования: | ||
1. Класс Listener должен быть создан внутри класса Solution. | ||
2. Класс Listener должен быть публичным. | ||
3. Класс Listener должен быть статическим. | ||
4. Должна быть запрещена возможность создавать экземпляры класса Listener. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
3.JavaMultithreading/src/com/javarush/task/task23/task2312/SnakeDirection.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.javarush.task.task23.task2312; | ||
|
||
|
||
public enum SnakeDirection { | ||
UP, | ||
RIGHT, | ||
|
Oops, something went wrong.