Skip to content

OOP#2596

Open
Andriisvv-cmd wants to merge 12 commits into
mate-academy:masterfrom
Andriisvv-cmd:master
Open

OOP#2596
Andriisvv-cmd wants to merge 12 commits into
mate-academy:masterfrom
Andriisvv-cmd:master

Conversation

@Andriisvv-cmd

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 with doWork() and stopWork() methods, proper inheritance from Truck, Bulldozer, and Excavator, correct method overrides with English messages, and polymorphism using a Machine array in MainApp. All core functionality is working as expected. The comments about empty lines and whitespace issues are style-only concerns that your linter will flag for you to fix. These are not critical blockers since the code compiles and runs correctly—your focus should be on understanding the OOP concepts, which you've demonstrated well. The linter feedback will guide you on the specific whitespace and formatting adjustments needed.


✨ 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 +7 to +8
new Bulldozer(),
new Excavator()

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. According to the checklist, we shouldn't add empty lines after method signature or class declaration.

Comment on lines +3 to +4
public class MainApp {

public static void main(String[] args){

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 class declaration opening brace.

Comment on lines +8 to +9
new Excavator()
};

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.

@Override
public void doWork() {
System.out.println("Excavator started its 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.

Redundant empty line after method signature. Remove this blank line as per checklist requirement.

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.

Redundant empty line after class declaration. Remove this blank line as per checklist requirement.

public void doWork() {
System.out.println("Bulldozer started its 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.

Redundant empty line before @OverRide. Per checklist: do not add empty lines after method signature.

@@ -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. Per checklist: do not add empty lines after class declaration or method signature.

Comment thread src/main/java/core/basesyntax/Bulldozer.java
Comment thread src/main/java/core/basesyntax/Truck.java
Comment thread src/main/java/core/basesyntax/Truck.java

@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 is correct and meets all functional requirements. The abstract Machine class properly defines doWork() and stopWork() methods, all three subclasses (Truck, Bulldozer, Excavator) correctly inherit from Machine and override both methods with appropriate English messages, and MainApp demonstrates polymorphism using a Machine array. The code is functionally complete with no blocking issues.


✨ 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,7 @@
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 - violates checklist item #1


public abstract class Machine {
public abstract void doWork();

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

@@ -0,0 +1,7 @@
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 - violates checklist item #1


public abstract class Machine {
public abstract void doWork();

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

@@ -0,0 +1,7 @@
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 - violates checklist item #1


public abstract class Machine {
public abstract void doWork();

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

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