Skip to content

complete jv-oop task#2613

Closed
P5w3L wants to merge 2 commits into
mate-academy:masterfrom
P5w3L:master
Closed

complete jv-oop task#2613
P5w3L wants to merge 2 commits into
mate-academy:masterfrom
P5w3L:master

Conversation

@P5w3L

@P5w3L P5w3L commented Jul 10, 2026

Copy link
Copy Markdown

I completed tasks. I use IntelliJ Idea and Git Terminal to do.

@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

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

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

package core.basesyntax;

public class Bulldozer extends Machine{
@Override

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() {

}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +5 to +6
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.

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.

Comment on lines +10 to +11
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.

This violates checklist item #1: "Write informative messages in methods..." The stopWork() method body is empty and should print that the bulldozer stopped working.

Comment on lines +5 to +6
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.

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.

Comment on lines +5 to +6
public static void main(String[] args) {
Machine truck = new Truck();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +10 to +11
Machine[] machines = {truck, bulldozer, excavator};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +8
public class MainApp {

public static void main(String[] args) {
Machine truck = new Truck();
Machine bulldozer = new Bulldozer();
Machine excavator = new Excavator();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +5 to +6
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.

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.

Comment on lines +10 to +11
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.

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.

@P5w3L P5w3L closed this Jul 10, 2026
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