Skip to content

Solved OOP Basic task#2584

Open
Constantin-Haranskiy wants to merge 4 commits into
mate-academy:masterfrom
Constantin-Haranskiy:master
Open

Solved OOP Basic task#2584
Constantin-Haranskiy wants to merge 4 commits into
mate-academy:masterfrom
Constantin-Haranskiy:master

Conversation

@Constantin-Haranskiy

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

Your implementation correctly fulfills all functional requirements. The abstract Machine class is properly defined, all three subclasses (Truck, Bulldozer, Excavator) correctly extend it and override both doWork() and stopWork() methods with informative English messages, and MainApp properly uses polymorphism with Machine array references. The build is currently failing due to Checkstyle violations—these are formatting issues, not code logic problems. The specific issues are: missing whitespace before { in class declarations across several files, missing newline at end of Excavator.java and Bulldozer.java, and a missing empty line before the method in Machine.java. These will be automatically flagged and fixable through your linter's feedback. All core requirements are met, and the code will compile once the formatting issues are addressed. Great work on the OOP structure and polymorphism implementation!


✨ 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

@@ -0,0 +1,13 @@
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.

Redundant empty line after package declaration - this violates the checklist item about not adding redundant empty lines

@@ -0,0 +1,13 @@
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.

Redundant empty line after package declaration - this violates the checklist item about not adding redundant empty lines

@@ -0,0 +1,13 @@
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.

Redundant empty line after package declaration - this violates the checklist item about not adding redundant empty lines

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.

Redundant empty line after package declaration - remove this blank line per checklist guidelines

Comment on lines +7 to +8
machines[0] = new Truck();
machines[1] = new Bulldozer();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty lines before method declaration and after closing brace - follow the no-empty-lines pattern shown in the checklist

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.

Redundant empty line after package declaration

Comment on lines +7 to +8
machines[0] = new Truck();
machines[1] = new Bulldozer();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty lines before method declaration - follow the compact style from checklist

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.

Redundant empty line after package declaration

Comment on lines 5 to 6
Machine[] machines = new Machine[3];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line after array initialization - remove blank line before first assignment

@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

The implementation meets all functional requirements and demonstrates proper use of OOP principles including abstraction, inheritance, and polymorphism. The style issues noted are formatting concerns that do not impact functionality and can be addressed separately.


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

Footnotes

  1. Rate AI review example

Comment on lines +5 to +6
public void doWork() {
System.out.println("Excavator started working");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line after method signature - violates checklist item #1 (no empty lines after method signature)

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.

Redundant empty line between methods - violates checklist item #1 (no redundant empty lines)

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