feat: add Truck, Bulldozer and Excavator machine class#2606
feat: add Truck, Bulldozer and Excavator machine class#2606vadym-bondar-g wants to merge 4 commits into
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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.
No description provided.