Skip to content

Conversation

@ReduxR
Copy link

@ReduxR ReduxR commented Feb 8, 2026

No description provided.

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

Your solution is approved because it fully meets the functional requirements: Machine is an abstract class with the required methods, Truck, Bulldozer, and Excavator correctly extend it and override doWork()/stopWork(), and MainApp uses a Machine[] and polymorphism to call these methods in a loop. The printed messages are in English and clearly identify each machine type, which satisfies the task’s messaging requirement. The remaining issues are minor style concerns: redundant empty lines in Excavator.java (after the class declaration and between methods), Bulldozer.java (after the class declaration and between methods), and Truck.java (after the package declaration and between methods), which go against the spacing guideline [CHECKLIST ITEM #0]. These are not blockers, but you should remove those blank lines to comply with the style checklist and keep your code tidy. As an optional improvement, you could also use more neutral phrasing in messages (e.g., started working instead of started his work) to make the output more universally readable. Overall, solid job on correctly using inheritance and polymorphism; just clean up the formatting in your next iteration.


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

Footnotes

  1. Rate AI review example

package core.basesyntax;

public class Excavator extends Machine {

Choose a reason for hiding this comment

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

This violates checklist item #0: 'Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature.' Remove the empty line immediately after the class declaration (line 4).

public void doWork() {
System.out.println("The excavator started his work");
}

Choose a reason for hiding this comment

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

This violates checklist item #0: 'Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature.' Remove the empty line between the two method implementations (line 9).

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

Choose a reason for hiding this comment

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

This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." There is an unnecessary blank line here — remove it.

public void doWork() {
System.out.println("The bulldozer started his work");
}

Choose a reason for hiding this comment

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

This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." There is an unnecessary blank line between method definitions here — remove it.

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

Choose a reason for hiding this comment

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

This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." Remove the redundant empty line after the package declaration.

public void doWork() {
System.out.println("The truck started his work");
}

Choose a reason for hiding this comment

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

This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." Remove the redundant empty line between the two method implementations.

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