Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented lottery class with colorSupplier and Ball class #1732

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ivanlavrinenko
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

Something went wrong while processing the review.
[CODE: 3]

If the issue is within your control, please address it.
The next review attempt will automatically launch in 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.

Great job on implementing the task requirements! 🎉 Your code is functional and meets the core requirements. While there are a couple of minor suggestions for improvement, such as adding a separator in the toString method for better readability and using a loop to create and print Ball objects, these do not impact the functionality. Keep up the good work and consider these suggestions for future enhancements! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +7 to +13
Ball ball1 = lottery.getRandomBall();
Ball ball2 = lottery.getRandomBall();
Ball ball3 = lottery.getRandomBall();

System.out.println(ball1.toString());
System.out.println(ball2.toString());
System.out.println(ball3.toString());

Choose a reason for hiding this comment

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

Consider using a loop to create and print the Ball objects. This approach is recommended in the checklist to avoid redundancy and improve code maintainability. You can create an array or list to store the balls and iterate over it to print their details.


@Override
public String toString() {
return this.color.toString() + this.number.toString();

Choose a reason for hiding this comment

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

Consider adding a separator between color and number in the toString method for better readability. For example, you could use a space or a hyphen.

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.

2 participants