-
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
add lottery #1731
add lottery #1731
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.
It looks like there are a couple of important issues to address before we can approve your pull request. Firstly, the Application
class should create and print three balls instead of just one. You can achieve this by using a loop to call the getRandomBall()
method from the Lottery
class three times. Secondly, there's an unused constructor in the Ball
class that should be removed if it's not necessary for your application. These changes will help align your code with the task requirements. Keep up the great work, and I'm confident you'll have this sorted out in no time! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
Lottery lottery = new Lottery(); | ||
|
||
Ball lotteryBall = lottery.getRandomBall(); | ||
System.out.println(lotteryBall); |
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.
You need to create three balls using the getRandomBall()
method and print their information. Consider using a loop to create and print three balls, as recommended in the checklist: 'Use for loop for creating several objects of the same class'.
public Ball(String randomColor, Random random) { | ||
} |
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.
The constructor Ball(String randomColor, Random random)
is not used and seems unnecessary given the current implementation. Consider removing it if it's not required for your application.
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 meets the specifications, and all previous issues have been addressed. The Ball
class, Color
enum, ColorSupplier
, Lottery
, and Application
classes are well-implemented and function as expected.
While there are no critical issues, always strive to review and refine your code to ensure it remains clean and efficient. Remember, continuous improvement is key to becoming a better developer. Keep up the good work and learn from any feedback provided. 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.