Skip to content

Solution implementation#2008

Open
tylerj231 wants to merge 2 commits intomate-academy:masterfrom
tylerj231:solution
Open

Solution implementation#2008
tylerj231 wants to merge 2 commits intomate-academy:masterfrom
tylerj231:solution

Conversation

@tylerj231
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link

@fetis-off fetis-off left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@tylerj231 tylerj231 requested a review from fetis-off February 11, 2026 14:32
Copy link

@Elena-Bruyako Elena-Bruyako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments
Please, check common mistakes file before sending the PR

package core.basesyntax;

public class Application {
public static final int ballAmount = 3;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,9 @@
package core.basesyntax;

public enum ColorsEnum {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import java.util.Random;

public class Lottery {
public static final int NumberBound = 100;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment about constant

public class ColorSupplier {
public String getRandomColor() {
return null;
public static String getRandomColor() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public static String getRandomColor() {
public String getRandomColor() {


public Ball getRandomBall() {
String randomColor = ColorSupplier.getRandomColor();
int randomNumber = new Random().nextInt(NumberBound);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants