Skip to content

feat: add Truck, Bulldozer and Excavator machine class#2606

Closed
vadym-bondar-g wants to merge 4 commits into
mate-academy:masterfrom
vadym-bondar-g:master
Closed

feat: add Truck, Bulldozer and Excavator machine class#2606
vadym-bondar-g wants to merge 4 commits into
mate-academy:masterfrom
vadym-bondar-g:master

Conversation

@vadym-bondar-g

Copy link
Copy Markdown

No description provided.

@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 the core task requirements and abstraction are not implemented yet, so the solution cannot function as specified. The Machine class (e.g., src/main/java/core/basesyntax/Machine.java) must be declared abstract and include public abstract void doWork() and public abstract void stopWork(); right now it is a concrete, empty class, which breaks the main OOP requirement [CHECKLIST ITEM #4]. Then, Truck, Bulldozer, and Excavator (in their respective files) need to extend Machine and override doWork()/stopWork() to print clear English messages such as Bulldozer started working and Bulldozer stopped working, so that each machine type is identifiable in the output [CHECKLIST ITEM #2]. You also need to add a MainApp class that creates a Machine[] containing instances of Truck, Bulldozer, and Excavator, and uses a loop to call doWork() and stopWork() on each element via Machine references, demonstrating polymorphism as required [CHECKLIST ITEM #3]. Once these pieces are in place, you can review access modifiers (e.g., keep methods public) and maintain clean formatting, but those are secondary to getting the core behavior working. You’ve created the basic class files, which is a good start—finishing the abstract class, inheritance, and main logic will complete the exercise and meet all the key requirements.


✨ 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

Comment thread src/main/java/core/basesyntax/Bulldozer.java Outdated
Comment thread src/main/java/core/basesyntax/Bulldozer.java Outdated
Comment thread src/main/java/core/basesyntax/Bulldozer.java Outdated
Comment thread src/main/java/core/basesyntax/Bulldozer.java Outdated
Comment thread src/main/java/core/basesyntax/Excavator.java Outdated
Comment thread src/main/java/core/basesyntax/Machine.java Outdated
Comment thread src/main/java/core/basesyntax/Truck.java Outdated
Comment thread src/main/java/core/basesyntax/Truck.java Outdated
Comment thread src/main/java/core/basesyntax/Truck.java Outdated
Comment thread src/main/java/core/basesyntax/Truck.java Outdated
@vadym-bondar-g vadym-bondar-g closed this by deleting the head repository Jun 28, 2026
@vadym-bondar-g vadym-bondar-g changed the title feat: add Truck, Bulldozer and Excavator machine classes feat: add Truck, Bulldozer and Excavator machine class Jun 28, 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