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 the task by creating all the classes and methods #1716

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

Conversation

LiudmylaKuzmenko
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.

Thank you for your hard work on this task! 😊 However, there are a few critical issues that need to be addressed before we can approve your submission. The Ball, Colors, and Lottery classes are missing, which are essential components of the task. These classes are crucial for the functionality of your application as they define the core logic and structure. Please implement these classes with the necessary fields and methods as described in the task requirements. Once these changes are made, your solution will be much closer to completion. Keep up the great effort, and don't hesitate to reach out if you need any help! 🚀

✨ 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.

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.

Review Summary

🎉 Great job on implementing the required classes and methods! Your solution meets the task requirements and constraints, and all necessary components are present. Here are some highlights and suggestions for improvement:

  • Ball Class: Well-implemented with private fields and appropriate methods. The toString() method is correctly overridden. No changes needed here.

  • Colors Enum: Correctly defined with color constants. This is used effectively in the ColorSupplier class.

  • ColorSupplier Class: Appropriately uses the Random class to provide a random color from the Colors enum. Well done!

  • Lottery Class: Generates a random Ball object with a random color and number. This is implemented correctly.

  • Application Class: Successfully creates and prints three Ball objects. However, consider refactoring your code to use a loop for creating and printing the balls to avoid redundancy and improve maintainability.

Your code is functional, and the decision to approve is made to help you move forward with your learning. Please review the comments to improve your code, especially regarding the use of loops to create multiple objects. Addressing these suggestions will enhance your coding skills and help avoid similar issues in the future. Keep up the good work and continue learning! 🚀

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

Comment on lines 6 to 12
Lottery lottery = new Lottery();
Ball firstBall = lottery.getRandomBall();
System.out.println(firstBall);
Ball secondBall = lottery.getRandomBall();
System.out.println(secondBall);
Ball thirdBall = lottery.getRandomBall();
System.out.println(thirdBall);

Choose a reason for hiding this comment

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

Instead of creating each Ball object separately, consider using a loop to create and print the balls. This approach will make your code cleaner and more maintainable. Refer to the checklist for an example of how to use a loop for creating multiple objects .

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