Solution#2595
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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"); | ||
| } |
There was a problem hiding this comment.
The checklist explicitly states to avoid redundant empty lines after method signature. Remove this empty line.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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"); | ||
| } |
There was a problem hiding this comment.
The checklist explicitly states to avoid redundant empty lines after method signature. Remove this empty line.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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"); |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
The checklist explicitly states to avoid redundant empty lines after class declaration. Remove this empty line.
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
The task requires creating a Machine array containing all three machine instances. Currently, separate variables are created instead of an array.
| public abstract void stopWork(); | ||
| } |
There was a problem hiding this comment.
Redundant empty line after method declaration - this follows the 'Bad example' pattern from the checklist.
| public abstract void stopWork(); | ||
| } |
There was a problem hiding this comment.
Redundant empty line after method declaration - this follows the 'Bad example' pattern from the checklist.
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
Redundant empty line after method signature - this follows the 'Bad example' pattern from the checklist.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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"); | ||
| } |
There was a problem hiding this comment.
Checklist violation: redundant empty line after method closing brace.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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"); | ||
| } |
There was a problem hiding this comment.
Checklist violation: redundant empty line after method closing brace.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Checklist violation: redundant empty line after class declaration.
| package core.basesyntax; | ||
|
|
||
| public class Bulldozer extends Machine { | ||
| public void doWork() { |
There was a problem hiding this comment.
Checklist violation: redundant empty line after method signature.
| @@ -0,0 +1,11 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Checklist violation: redundant empty line after class declaration.
| 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(); |
There was a problem hiding this comment.
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; | |||
|
|
|||
There was a problem hiding this comment.
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"); | ||
| } |
There was a problem hiding this comment.
Checklist violation: redundant empty line after method declaration. Remove this empty line as per the checklist guidelines.
No description provided.