Skip to content

add Truck.java, Bulldozer.java, Excavator.java, Machine.java and real…#2530

Open
MrRaveGit wants to merge 1 commit intomate-academy:masterfrom
MrRaveGit:hw-oop-basic-solution
Open

add Truck.java, Bulldozer.java, Excavator.java, Machine.java and real…#2530
MrRaveGit wants to merge 1 commit intomate-academy:masterfrom
MrRaveGit:hw-oop-basic-solution

Conversation

@MrRaveGit
Copy link

…ise MainApp.java method

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

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

  1. Rate AI review example

@@ -0,0 +1,14 @@
package core.basesyntax;

class Excavator extends Machine {

Choose a reason for hiding this comment

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

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.

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