Skip to content

add abstract class Machine and its subclasses#2593

Open
zibi-dev wants to merge 1 commit into
mate-academy:masterfrom
zibi-dev:develop
Open

add abstract class Machine and its subclasses#2593
zibi-dev wants to merge 1 commit into
mate-academy:masterfrom
zibi-dev:develop

Conversation

@zibi-dev

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 successfully fulfills all core OOP requirements. The abstract Machine class with its two abstract methods is correctly defined, all three subclasses (Truck, Bulldozer, Excavator) properly extend it with informative English messages, and MainApp demonstrates correct polymorphism using a Machine[] array. The functional implementation is solid and meets all task specifications. While there are some empty line formatting issues mentioned (redundant lines after package declarations and between methods), these are cosmetic whitespace concerns rather than critical blockers—the code works correctly. You may want to run your linter to clean up the formatting, but the solution is approved.


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

Footnotes

  1. Rate AI review example

Comment thread src/main/java/core/basesyntax/Machine.java
Comment thread src/main/java/core/basesyntax/Machine.java
Comment thread src/main/java/core/basesyntax/Machine.java

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 between abstract method declarations. Remove it.

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

public abstract void stopWork();

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 it.

@@ -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: avoid empty lines after class declaration or 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: avoid empty lines after class declaration or 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: avoid empty lines after class declaration or 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: remove empty lines after class declaration or method signature.

public void doWork() {
System.out.println("Truck 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 between methods. Per checklist: remove empty lines after method signature.

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