-
Notifications
You must be signed in to change notification settings - Fork 1.8k
realize new classes and methods #2460
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
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
Decision: APPROVE — Functionality is correct and all core requirements are met.
Your implementation correctly defines Machine as abstract, implements Truck, Bulldozer, and Excavator with proper doWork()/stopWork() overrides, and uses polymorphism in MainApp to iterate and invoke both methods. The only issues found are minor style violations related to redundant blank lines [CHECKLIST ITEM #1]:
Machine.java: remove the empty line betweendoWork()andstopWork()(around line 5).Bulldozer.java: remove the blank line betweendoWork()and@Override stopWork()(around line 8).Truck.java: remove the blank line between the two methods (around line 8).Excavator.java: remove the blank line after thepackagedeclaration and the one betweendoWork()and@Override stopWork().
These are non-blocking and easy to fix. Nice job on clean, readable methods and correct use of polymorphism—please tidy the blank lines to align with the checklist.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| public void doWork() { | ||
| System.out.println("Bulldozer started its 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 #1: "Do not add redundant empty lines after class declarations or method signatures". There is an extra blank line at line 8 between the end of doWork() and the @Override of stopWork() — remove that blank line so the method declarations appear consecutively. Refer to the checklist for the rule.
| @@ -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 #1: "Do not add redundant empty lines after class declarations or method signatures". Remove the empty line after the package declaration so there are no redundant blank lines between package and the class declaration.
| public void doWork() { | ||
| System.out.println("Excavator started its 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 #1: "Do not add redundant empty lines after class declarations or method signatures". Remove the empty line between the end of doWork() and the @Override for stopWork() so the methods appear consecutively without redundant blank lines.
|
|
||
| public abstract class Machine { | ||
| public abstract void doWork(); | ||
|
|
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 #1: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature."
There is a redundant empty line between the doWork() and stopWork() declarations. Remove the blank line at line 5 so the method declarations appear consecutively.
| public void doWork() { | ||
| System.out.println("Truck started its 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 #1: "Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature."
There is a redundant empty line between the doWork() and stopWork() methods (remove the blank line at line 8 so the methods appear consecutively).
No description provided.