complete jv-oop task#2613
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because core functional requirements from the task are not yet implemented, so the solution is incomplete. The methods doWork() and stopWork() in all concrete subclasses (Truck, Bulldozer, Excavator) are empty and do not print any informative English messages indicating which machine is starting or stopping work, which is explicitly required by the task and [CHECKLIST ITEM #1]. To fix this, inside each override add System.out.println(...) calls with clear messages like "Truck started working" / "Truck stopped working", "Bulldozer started working", "Excavator stopped working", etc. There are also some style issues with extra or missing spaces and redundant blank lines after class declarations and method signatures (e.g., in Bulldozer.java, Excavator.java, Machine.java, MainApp.java, Truck.java), which you should clean up to satisfy the checklist and resolve the Checkstyle errors. Functionally, the abstract structure and the use of Machine[] and polymorphism in MainApp are correct, so once you add the required messages and tidy up spacing/empty lines, your solution will fully meet the task requirements. Keep going—your class design is on the right track; you just need to complete the behavior and align the formatting with the project standards.
✨ 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
| package core.basesyntax; | ||
|
|
||
| public class Bulldozer extends Machine{ | ||
| @Override |
There was a problem hiding this comment.
This violates checklist item "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." because there is an unnecessary blank line immediately after the class declaration.
| @Override | ||
| public void doWork() { | ||
|
|
||
| } |
There was a problem hiding this comment.
This violates checklist item "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." because there is an unnecessary blank line between the two abstract method declarations and before the closing brace.
| public void doWork() { | ||
|
|
There was a problem hiding this comment.
This violates checklist item #1: "Write informative messages in methods. - Use English only and make messages informative - The message should indicate what type of Machine is working right now Truck, Bulldozer or Excavator." The doWork() method body is empty and should print that the bulldozer started working.
| public void stopWork() { | ||
|
|
There was a problem hiding this comment.
This violates checklist item #1: "Write informative messages in methods..." The stopWork() method body is empty and should print that the bulldozer stopped working.
| public void doWork() { | ||
|
|
There was a problem hiding this comment.
This violates checklist item #1: "Write informative messages in methods. - Use English only and make messages informative - The message should indicate what type of Machine is working right now Truck, Bulldozer or Excavator." The doWork() method body is empty and should print that the excavator started working.
| public static void main(String[] args) { | ||
| Machine truck = new Truck(); |
There was a problem hiding this comment.
This violates checklist item #1: Write informative messages in methods... The doWork() method is empty and should print an informative message that an excavator started working.
| Machine[] machines = {truck, bulldozer, excavator}; | ||
|
|
There was a problem hiding this comment.
This also violates checklist item #1: Write informative messages in methods... The stopWork() method is empty and should print an informative message that an excavator stopped working.
| public class MainApp { | ||
|
|
||
| public static void main(String[] args) { | ||
| Machine truck = new Truck(); | ||
| Machine bulldozer = new Bulldozer(); | ||
| Machine excavator = new Excavator(); |
There was a problem hiding this comment.
This violates checklist item Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature. There are extra blank lines after the class declaration and between the abstract methods that are not needed for this simple class.
| public void doWork() { | ||
|
|
There was a problem hiding this comment.
This violates checklist item #1: Write informative messages in methods. - Use English only and make messages informative - The message should indicate what type of Machine is working right now Truck, Bulldozer or Excavator. The doWork() method body is empty and should print that the truck started working.
| public void stopWork() { | ||
|
|
There was a problem hiding this comment.
This also violates checklist item #1: Write informative messages in methods... The stopWork() method body is empty and should print that the truck stopped working.
I completed tasks. I use IntelliJ Idea and Git Terminal to do.