-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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! ✨
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()); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
No description provided.