add Truck.java, Bulldozer.java, Excavator.java, Machine.java and real…#2530
add Truck.java, Bulldozer.java, Excavator.java, Machine.java and real…#2530MrRaveGit wants to merge 1 commit intomate-academy:masterfrom
Conversation
…ise MainApp.java method
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this task! Your implementation correctly demonstrates the principles of inheritance and polymorphism, and all functional requirements are met. I am approving your solution.
One small point for future consideration is the access modifier on the Excavator class. It has default (package-private) access, while the other Machine subclasses are public. For consistency and to ensure classes are accessible from other packages in larger applications, it's a good practice to declare them as public.
Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| @@ -0,0 +1,14 @@ | |||
| package core.basesyntax; | |||
|
|
|||
| class Excavator extends Machine { | |||
There was a problem hiding this comment.
This class has default (package-private) access, while the Truck and Bulldozer classes are public. For consistency and to make it clearly accessible from other packages in a larger application, consider declaring this class as public.
…ise MainApp.java method