Skip to content

Conversation

S0rbex
Copy link

@S0rbex S0rbex commented Sep 1, 2025

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

Decision: REQUEST_CHANGES

Your OOP structure is solid: Machine is abstract, subclasses override methods correctly, and MainApp demonstrates polymorphism. However, there’s a critical blocker related to required output messages.

Issues to fix (critical blockers):

  1. Non-English and non-informative messages in doWork() and stopWork():
    • Files and lines (approximate, adjust to your file):
      • src/main/java/core/basesyntax/Bulldozer.java: lines where doWork() and stopWork() print messages
      • src/main/java/core/basesyntax/Excavator.java: lines where doWork() and stopWork() print messages
      • src/main/java/core/basesyntax/Truck.java: lines where doWork() and stopWork() print messages
    • Why: Violates the checklist item “Write informative messages in methods” and the requirement that messages be in English and explicitly state the machine started/stopped working.
    • How to fix:
      • Update each method to something like:
        • System.out.println("Bulldozer started working");
        • System.out.println("Bulldozer stopped working");
        • Repeat similarly for Excavator and Truck.
  2. Non-English separator message in MainApp:
    • File: src/main/java/core/basesyntax/MainApp.java (the line with "--- Нова машина ---")
    • Why: All output should be in English for consistency with the checklist.
    • How to fix: Change to System.out.println("--- New machine ---"); or remove if not required by the task.

What you did well:

  • Correct abstraction and inheritance setup.
  • Proper use of Machine[] and polymorphic calls.

Once you update the messages to clear English statements indicating start/stop per machine, this should meet all requirements. Keep it up—you’re very close!


✨ 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

public class Bulldozer extends Machine {
@Override
public void doWork() {
System.out.println("Started зносити все живе");

Choose a reason for hiding this comment

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

The message in doWork() is not in English and does not clearly state that the Bulldozer started working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Bulldozer started working.


@Override
public void stopWork() {
System.out.println("Stopped зносити все живе");

Choose a reason for hiding this comment

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

The message in stopWork() is not in English and does not clearly state that the Bulldozer stopped working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Bulldozer stopped working.

public class Excavator extends Machine {
@Override
public void doWork() {
System.out.println("Started копати");

Choose a reason for hiding this comment

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

The message in doWork() is not in English and does not clearly state that the Excavator started working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Excavator started working.


@Override
public void stopWork() {
System.out.println("Stopped копати");

Choose a reason for hiding this comment

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

The message in stopWork() is not in English and does not clearly state that the Excavator stopped working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Excavator stopped working.


// Виконуємо цикл для кожного об'єкта в масиві
for (Machine machine : machines) {
System.out.println("--- Нова машина ---");

Choose a reason for hiding this comment

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

The message "--- Нова машина ---" is not in English. All output messages should be in English according to the checklist requirement: "Write informative messages in methods." Consider changing this to something like "--- New machine ---" for consistency.

public class Truck extends Machine {
@Override
public void doWork() {
System.out.println("Started рухатись");

Choose a reason for hiding this comment

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

The message in doWork() is not in English and does not clearly state that the Truck started working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Truck started working.


@Override
public void stopWork() {
System.out.println("Stopped рухатись");

Choose a reason for hiding this comment

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

The message in stopWork() is not in English and does not clearly state that the Truck stopped working. This violates the checklist item: "Write informative messages in methods." The message should be in English and explicitly mention that the Truck stopped working.

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: Request changes

Reason: Your implementation is solid in terms of OOP structure and polymorphism, but it violates an explicit checklist requirement: “Write informative messages in methods.” The output in doWork()/stopWork() for all machine subclasses must follow the exact, concise format “X started working” / “X stopped working.” This is a critical blocker because tests/checks likely expect these exact messages.

Critical issues to fix (with specifics and how to fix):

  • src/main/java/core/basesyntax/Bulldozer.java
    • doWork() — replace the message with: System.out.println("Bulldozer started working");
    • stopWork() — replace the message with: System.out.println("Bulldozer stopped working");
  • src/main/java/core/basesyntax/Excavator.java
    • doWork() — replace the message with: System.out.println("Excavator started working");
    • stopWork() — replace the message with: System.out.println("Excavator stopped working");
  • src/main/java/core/basesyntax/Truck.java
    • doWork() — replace the message with: System.out.println("Truck started working");
    • stopWork() — replace the message with: System.out.println("Truck stopped working");

Why this is required: The checklist explicitly requires concise, informative, and English messages that clearly state which machine started/stopped working. Overly descriptive or differently phrased strings will fail strict output checks.

What’s good: Your abstract class, method signatures, subclassing, and MainApp polymorphic iteration are all correct and clean.

Please make the above message changes and resubmit. You’re very close—once updated, this should fully meet the requirements!


✨ 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 6 to 8
System.out.println("The bulldozer roars to life, "
+ "its massive blade positioned and ready to push through earth and debris "
+ "with relentless mechanical force.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Bulldozer started working, e.g., System.out.println("Bulldozer started working");

Comment on lines 13 to 15
System.out.println("The bulldozer's engine winds down to silence,"
+ " leaving behind a transformed landscape of leveled "
+ "ground and cleared pathways.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Bulldozer stopped working, e.g., System.out.println("Bulldozer stopped working");

Comment on lines 6 to 7
System.out.println("The excavator's hydraulic arm extends with mechanical precision,"
+ " its bucket poised to bite deep into the earth and scoop away tons of soil.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Excavator started working, e.g., System.out.println("Excavator started working");

Comment on lines 12 to 13
System.out.println("The excavator's arm retracts one final time, "
+ "settling into rest position as the day's digging operations draw to a close.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Excavator stopped working, e.g., System.out.println("Excavator stopped working");

Comment on lines 6 to 7
System.out.println("The truck's engine rumbles to life as the driver engages the gears,"
+ " ready to haul its heavy cargo across distances with steady determination.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Truck started working, e.g., System.out.println("Truck started working");

Comment on lines 12 to 14
System.out.println("The truck comes to a final stop, "
+ "its cargo safely delivered and its mission complete until "
+ "the next journey begins.");

Choose a reason for hiding this comment

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

This violates checklist item: "Write informative messages in methods". The message should be simple and clearly state that the Truck stopped working, e.g., System.out.println("Truck stopped working");

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

Educational approval: Great work—your implementation cleanly meets the OOP requirements. The abstract Machine with doWork() and stopWork() is correctly defined, and Truck, Bulldozer, and Excavator provide clear, concise English outputs that identify the machine and action. MainApp effectively demonstrates polymorphism by using a Machine[] and invoking methods via abstract references.

What you did well:

  • Clear adherence to abstraction and polymorphism (checklist 1.1–1.4, 2.4).
  • Concise, informative messages and clean formatting (checklist 3.1, 4.1–4.3).

Minor polish ideas (optional):

  • Consider consistent message phrasing across all classes (e.g., “started working” vs. “is working”) to keep outputs uniform.

You’re on the right track—nice job keeping it simple and correct. Keep practicing this pattern for future hierarchies!


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

Footnotes

  1. Rate AI review example

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