add abstract class Machine and its subclasses#2593
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
Redundant empty line between abstract method declarations. Remove it.
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
||
| public abstract void stopWork(); |
There was a problem hiding this comment.
Redundant empty line after array initialization. Remove it.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration. Per checklist: avoid empty lines after class declaration or method signature.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration. Per checklist: avoid empty lines after class declaration or method signature.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration. Per checklist: avoid empty lines after class declaration or method signature.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
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!"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Redundant empty line between methods. Per checklist: remove empty lines after method signature.
No description provided.