Skip to content

Conversation

KhapalSofiia
Copy link

Also added methods doWork() and stopWork().

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

Decision: APPROVE

Why: All core requirements are fully met: Machine is abstract with doWork()/stopWork(), subclasses override correctly with clear English messages, and MainApp uses a Machine[] and loops calling both methods. Functionality is correct and nothing blocks execution.

Minor improvements (non-blockers):

  • Remove redundant empty lines immediately after the package declaration in these files: Machine.java, MainApp.java, Truck.java, Bulldozer.java, Excavator.java (violates the “no redundant empty lines” checklist). For example, in each file, delete the blank line right after package core.basesyntax;.
  • Remove redundant semicolons after method bodies in Truck.java, Bulldozer.java, and Excavator.java (e.g., after the closing brace of doWork()), as they’re unnecessary.

Great job on abstraction and polymorphism. Tidy up the minor style issues when you can to align perfectly with the checklist.


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

Footnotes

  1. Rate AI review example

@@ -0,0 +1,12 @@
package core.basesyntax;

Choose a reason for hiding this comment

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

There is a redundant empty line after the package declaration. This violates checklist item: "Please don't add redundant empty lines to your code."

@Override
public void doWork(){
System.out.println("Bulldozer started work");
};

Choose a reason for hiding this comment

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

There is a redundant semicolon after the closing brace of the doWork() method. While this does not break functionality, it is unnecessary and should be removed for cleaner code.

@@ -0,0 +1,12 @@
package core.basesyntax;

Choose a reason for hiding this comment

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

There is a redundant empty line after the package declaration. This violates checklist item: "Please don't add redundant empty lines to your code."

@Override
public void doWork(){
System.out.println("Excavator started work");
};

Choose a reason for hiding this comment

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

There is a redundant semicolon after the closing brace of the doWork() method. While this does not break functionality, it is unnecessary and should be removed for cleaner code.

@@ -0,0 +1,6 @@
package core.basesyntax;

Choose a reason for hiding this comment

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

There is a redundant empty line after the package declaration. This violates checklist item: "Please don't add redundant empty lines to your code."

@@ -1,5 +1,11 @@
package core.basesyntax;

Choose a reason for hiding this comment

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

There is a redundant empty line after the package declaration. This violates checklist item: "Please don't add redundant empty lines to your code."

@@ -0,0 +1,12 @@
package core.basesyntax;

Choose a reason for hiding this comment

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

There is a redundant empty line after the package declaration. This violates checklist item: "Please don't add redundant empty lines to your code."

@Override
public void doWork(){
System.out.println("Truck started work");
};

Choose a reason for hiding this comment

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

There is a redundant semicolon after the closing brace of the doWork() method. While this does not break functionality, it is unnecessary and should be removed for cleaner code.

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