Skip to content

new#2611

Open
vadym-bondar-g wants to merge 5 commits into
mate-academy:masterfrom
vadym-bondar-g:master
Open

new#2611
vadym-bondar-g wants to merge 5 commits into
mate-academy:masterfrom
vadym-bondar-g:master

Conversation

@vadym-bondar-g

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment on lines +11 to +12
System.out.println("Bulldozer is stop to work");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +11 to +12
public void stopWork() {
System.out.println("Bulldozer is stop to work");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +1 to +2
package core.basesyntax;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +3 to +4
public class Excavator extends Machine {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +8 to +9
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +11 to +12
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +1 to +2
package core.basesyntax;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment on lines +7 to +8
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 mateuszwojtkowiak left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The messages in the println statements are grammatically incorrect.
They should use the correct verb forms: “starts working” and “stops working”.

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.

3 participants