OOP#2596
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
| new Bulldozer(), | ||
| new Excavator() |
There was a problem hiding this comment.
Redundant empty line between methods. According to the checklist, we shouldn't add empty lines after method signature or class declaration.
| public class MainApp { | ||
|
|
||
| public static void main(String[] args){ |
There was a problem hiding this comment.
Redundant empty line after class declaration opening brace.
| new Excavator() | ||
| }; |
There was a problem hiding this comment.
Redundant empty line between methods.
| @Override | ||
| public void doWork() { | ||
| System.out.println("Excavator started its work"); | ||
| } |
There was a problem hiding this comment.
Redundant empty line after method signature. Remove this blank line as per checklist requirement.
| package core.basesyntax; | ||
|
|
||
| public class Excavator extends Machine { | ||
|
|
There was a problem hiding this comment.
Redundant empty line after class declaration. Remove this blank line as per checklist requirement.
| public void doWork() { | ||
| System.out.println("Bulldozer started its work"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Redundant empty line before @OverRide. Per checklist: do not add empty lines after method signature.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration. Per checklist: do not add empty lines after class declaration or method signature.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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
| @@ -0,0 +1,7 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration - violates checklist item #1
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
Redundant empty line after method signature - violates checklist item #1
| @@ -0,0 +1,7 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration - violates checklist item #1
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
Redundant empty line after method signature - violates checklist item #1
| @@ -0,0 +1,7 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Redundant empty line after package declaration - violates checklist item #1
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
There was a problem hiding this comment.
Redundant empty line after method signature - violates checklist item #1
No description provided.