Skip to content

Solution#2595

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

Solution#2595
mykhalenych wants to merge 1 commit into
mate-academy:masterfrom
mykhalenych:develop

Conversation

@mykhalenych

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


✨ 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,11 @@
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.

The checklist explicitly states to avoid redundant empty lines after class declaration. Remove this empty line.

public class Excavator extends Machine {
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.

The checklist explicitly states to avoid redundant empty lines after method signature. Remove this empty line.

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

The checklist explicitly states to avoid redundant empty lines after class declaration. Remove this empty line.

public class Excavator extends Machine {
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.

The checklist explicitly states to avoid redundant empty lines after method signature. Remove this empty line.

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

The checklist explicitly states to avoid redundant empty lines after class declaration. Remove this empty line.


public class Excavator extends Machine {
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.

The checklist explicitly states to avoid redundant empty lines after method signature. Remove this empty line.

System.out.println("Excavator started its work");
}

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

The checklist explicitly states to avoid redundant empty lines after class declaration. Remove this empty line.


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.

The task requires creating a Machine array containing all three machine instances. Currently, separate variables are created instead of an array.

Comment on lines +6 to +7
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 method declaration - this follows the 'Bad example' pattern from the checklist.

Comment on lines +6 to +7
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 method declaration - this follows the 'Bad example' pattern from the checklist.

Comment on lines +4 to +5
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 - this follows the 'Bad example' pattern from the checklist.

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

Checklist violation: redundant empty line after class declaration. Remove the empty line on line 2.

public class Bulldozer extends Machine {
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.

Checklist violation: redundant empty line after method closing brace.

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

Checklist violation: redundant empty line after class declaration. Remove the empty line on line 2.

public class Bulldozer extends Machine {
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.

Checklist violation: redundant empty line after method closing brace.

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

Checklist violation: redundant empty line after class declaration.

package core.basesyntax;

public class Bulldozer extends Machine {
public 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.

Checklist violation: redundant empty line after method signature.

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

Checklist violation: redundant empty line after class declaration.

Comment on lines +4 to +15
public static void main(String[] args) {
Machine truc = new Truck();
truc.doWork();
truc.stopWork();

Machine bulldozer = new Bulldozer();
bulldozer.doWork();
bulldozer.stopWork();

Machine excavator = new Excavator();
excavator.doWork();
excavator.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.

The description requires creating a 'Machine array' and calling methods 'in a loop'. Currently, three separate variables are used instead of an array, and there is no loop. This doesn't demonstrate polymorphism as intended.

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

Checklist violation: redundant empty line after class declaration. Remove this empty line as per the 'Bad example' pattern in the checklist.

public class Truck extends Machine {
public void doWork() {
System.out.println("Truck 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.

Checklist violation: redundant empty line after method declaration. Remove this empty line as per the checklist guidelines.

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