-
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
Solved lottery task #1728
base: master
Are you sure you want to change the base?
Solved lottery task #1728
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.
Thank you for your hard work on this pull request! 😊 While your solution is on the right track, there are a few critical issues that need to be addressed before we can approve it.
-
Static Method Usage: The
getRandomColor()
method in theColorSupplier
class is currently static. It's recommended to create an instance ofColorSupplier
and call the method on that instance to align with best practices. -
Access Modifiers: Ensure that all classes and methods have explicit access modifiers to improve code readability and maintainability.
-
Enum Naming Convention: The values in the
Colors
enum should follow the naming conventions for constants, using uppercase letters for better clarity. -
Redundant Temporary Variables: Simplify the
getRandomColor()
method by directly returning the value fromColors.values()
instead of using a temporary variable. -
Missing Files: Please ensure that the
Ball
,Lottery
, andColors
enum files are included, as they are essential for the task.
Addressing these issues will significantly improve the quality and functionality of your code. Keep up the great work, and I'm confident you'll nail it with these adjustments! 🚀
✨ 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.
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 well-structured, and all necessary files are present. The Ball
class, Colors
enum, ColorSupplier
, and Lottery
class are correctly implemented, and the main()
method in Application.java
functions as expected.
However, ensure that the Lottery
class and its getRandomBall()
method are correctly implemented and available in the project. Also, verify that the Colors
enum is defined and accessible. These are crucial for the functionality of your code.
The decision to approve is made to help you move forward with your learning journey. Please review the comments to improve your code further. Addressing these issues will help you avoid similar problems in the future. Keep up the good work, and continue to learn from your experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.