-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
reesolve #1252
base: master
Are you sure you want to change the base?
reesolve #1252
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.
Great job on implementing the FruitShop
application! 🎉 Your code is well-structured and meets most of the task requirements. Here are some key points to consider for improvement:
-
Exception Handling: Consider using a custom exception, such as
InvalidDataException
, instead of a genericRuntimeException
for better error specificity and handling, especially when dealing with IO errors or invalid operation codes. -
File Handling: Use try-with-resources in the
FileReaderServiceImpl
class to ensure resources are closed properly. Also, ensure that file paths are relative and placed in thesrc/main/resources
folder as recommended. -
Encapsulation: Improve encapsulation in the
FruitTransaction
class by making fields private and providing controlled access through getters and setters. -
SOLID Principles: Ensure each class and method has a single responsibility, and high-level modules do not depend on low-level modules.
Your code is on the right track, and addressing these points will enhance its robustness and maintainability. Keep up the good work and continue learning from these experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.