new#2611
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there is a functional / requirement-level issue that blocks full compliance. In src/main/java/core/basesyntax/Excavator.java, the stopWork() method currently prints "Bulldozer is stop to work", which is both the wrong machine name and violates the requirement that messages must correctly indicate the type of Machine working or stopping [CHECKLIST ITEM #2]. This same incorrect message text appears wherever Excavator.stopWork() output is expected (e.g., in MainApp when the excavator stops), so the program produces misleading output for that machine. To fix this, update Excavator.stopWork() (around that method’s System.out.println line) to mention Excavator and use clear English, for example a phrasing like "Excavator stopped working".
Beyond that blocker, there are style issues with redundant blank lines after package and class declarations and between methods in Excavator.java and Truck.java that conflict with the checklist guidance about avoiding extra empty lines [CHECKLIST ITEM #1]; these are not functional blockers but are worth cleaning up now. Also, consider improving all messages from forms like "is start to work" / "is stop to work" to more natural English such as "started working" / "stopped working" to fully meet the informative message requirement. Your overall OOP structure, use of an abstract Machine class, and polymorphic array in MainApp are correct, so once you fix the excavator’s stop message and tidy the spacing, this solution will be in good shape.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| System.out.println("Bulldozer is stop to work"); | ||
| } |
There was a problem hiding this comment.
stopWork() prints "Bulldozer is stop to work" even though this is the Excavator class. This violates checklist item #2 (message must indicate the correct Machine type) and should instead mention Excavator stopping work.
| public void stopWork() { | ||
| System.out.println("Bulldozer is stop to work"); |
There was a problem hiding this comment.
stopWork() prints "Bulldozer is stop to work", which violates checklist item about informative messages: the type of Machine must be correctly indicated, and here it should say that the Excavator stopped working, not Bulldozer.
| package core.basesyntax; | ||
|
|
There was a problem hiding this comment.
The blank line after the package declaration and before the class declaration matches the bad example in checklist item Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature. Consider removing these extra empty lines.
| public class Excavator extends Machine { | ||
|
|
There was a problem hiding this comment.
The blank line between the class declaration and the @Override also matches the bad example pattern in checklist item about redundant empty lines after class declaration/method signature. Removing it will align with the checklist.
| } | ||
|
|
There was a problem hiding this comment.
The blank line between doWork() and the next @Override annotation again follows the bad example for redundant empty lines after method signatures from the checklist. Consider tightening up the spacing.
| } | ||
| } |
There was a problem hiding this comment.
stopWork() should print a message indicating that the Excavator stopped working, but currently prints "Bulldozer is stop to work", which violates checklist item about informative messages and correct machine type.
| package core.basesyntax; | ||
|
|
There was a problem hiding this comment.
The blank line after the package declaration and before the class declaration matches the bad pattern described in checklist item: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." Consider removing this extra line.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| public class Truck extends Machine { | |||
There was a problem hiding this comment.
The blank line between the class declaration and the @Override annotation also follows the bad example for redundant empty lines after class declaration/method signature from the checklist. Tighten up spacing here.
| } | ||
|
|
There was a problem hiding this comment.
The blank line between the end of doWork() and the next @Override again matches the bad example pattern of redundant empty lines after method signatures in checklist item #1. Removing it will align the file with the checklist.
mateuszwojtkowiak
left a comment
There was a problem hiding this comment.
Great job! The task is accepted. Please update the messages in the System.out.println statements, as they contain grammatical errors.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| public class Bulldozer extends Machine { | |||
There was a problem hiding this comment.
The messages in the println statements are grammatically incorrect.
They should use the correct verb forms: “starts working” and “stops working”.
| @@ -0,0 +1,14 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| public class Excavator extends Machine { | |||
There was a problem hiding this comment.
The messages in the println statements are grammatically incorrect.
They should use the correct verb forms: “starts working” and “stops working”.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| public class Truck extends Machine { | |||
There was a problem hiding this comment.
The messages in the println statements are grammatically incorrect.
They should use the correct verb forms: “starts working” and “stops working”.
No description provided.