-
Notifications
You must be signed in to change notification settings - Fork 1.9k
assignment completed #2538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
assignment completed #2538
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
Your solution is approved because it fully meets the functional requirements: Machine is an abstract class with the required methods, Truck, Bulldozer, and Excavator correctly extend it and override doWork()/stopWork(), and MainApp uses a Machine[] and polymorphism to call these methods in a loop. The printed messages are in English and clearly identify each machine type, which satisfies the task’s messaging requirement. The remaining issues are minor style concerns: redundant empty lines in Excavator.java (after the class declaration and between methods), Bulldozer.java (after the class declaration and between methods), and Truck.java (after the package declaration and between methods), which go against the spacing guideline [CHECKLIST ITEM #0]. These are not blockers, but you should remove those blank lines to comply with the style checklist and keep your code tidy. As an optional improvement, you could also use more neutral phrasing in messages (e.g., started working instead of started his work) to make the output more universally readable. Overall, solid job on correctly using inheritance and polymorphism; just clean up the formatting in your next iteration.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| package core.basesyntax; | ||
|
|
||
| public class Excavator extends Machine { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: 'Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature.' Remove the empty line immediately after the class declaration (line 4).
| public void doWork() { | ||
| System.out.println("The excavator started his work"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: 'Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature.' Remove the empty line between the two method implementations (line 9).
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." There is an unnecessary blank line here — remove it.
| public void doWork() { | ||
| System.out.println("The bulldozer started his work"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." There is an unnecessary blank line between method definitions here — remove it.
| @@ -0,0 +1,13 @@ | |||
| package core.basesyntax; | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." Remove the redundant empty line after the package declaration.
| public void doWork() { | ||
| System.out.println("The truck started his work"); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This violates checklist item #0: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature." Remove the redundant empty line between the two method implementations.
No description provided.