-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added new classes Machine, Truck, Bulldozer, Excavator and created and overrided methods doWork() and stopWork() #2464
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
base: master
Are you sure you want to change the base?
Conversation
…d overrided methods doWork() and stopWork()
mateacademy-ai-mentor
left a comment
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.
Review Summary
Your solution is approved. You implemented the abstract Machine with the exact required signatures (public abstract void doWork() and public abstract void stopWork()), and each concrete class (Truck, Bulldozer, Excavator) correctly overrides both methods with clear English messages identifying the machine type. MainApp properly demonstrates polymorphism by storing different machines in a Machine[] and invoking doWork() and stopWork() in a loop, and all classes/methods have appropriate access modifiers for a runnable program.
Minor improvement (optional): consider standardizing the wording of the printed messages across all machines for consistency (e.g., use “started working”/“stopped working” uniformly). Great job meeting the core requirements and keeping the implementation clean and straightforward!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
mateacademy-ai-mentor
left a comment
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
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
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
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
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
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
Elena-Bruyako
left a comment
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.
Good job
No description provided.