Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
The test task has already been approved.
[CODE: AAP]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
The test task has already been approved.
[CODE: AAP]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
The test task has already been approved.
[CODE: AAP]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
The test task has already been approved.
[CODE: AAP]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
|
|
||
| public class Lottery { | ||
|
|
||
| public static Ball getRandomBall() { |
There was a problem hiding this comment.
| public static Ball getRandomBall() { | |
| public Ball getRandomBall() { |
Static methods are in general a bad practice. Let's better create an instance of a class which method you want to call.
Elena-Bruyako
left a comment
There was a problem hiding this comment.
See comments
Please, check common mistakes file before sending the PR
| package core.basesyntax; | ||
|
|
||
| public class Application { | ||
| public static final int ballAmount = 3; |
There was a problem hiding this comment.
| @@ -0,0 +1,9 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| public enum ColorsEnum { | |||
There was a problem hiding this comment.
| public enum ColorsEnum { | |
| public enum Color { |
| public static String getRandomColor() { | ||
| ColorsEnum [] colors = ColorsEnum.values(); | ||
| int index = new Random().nextInt(colors.length); | ||
| return colors[index].toString(); |
There was a problem hiding this comment.
| import java.util.Random; | ||
|
|
||
| public class Lottery { | ||
| public static final int NumberBound = 100; |
| public class ColorSupplier { | ||
| public String getRandomColor() { | ||
| return null; | ||
| public static String getRandomColor() { |
There was a problem hiding this comment.
| public static String getRandomColor() { | |
| public String getRandomColor() { |
|
|
||
| public Ball getRandomBall() { | ||
| String randomColor = ColorSupplier.getRandomColor(); | ||
| int randomNumber = new Random().nextInt(NumberBound); |
There was a problem hiding this comment.
No description provided.