-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat: implemented Machine class and subclasses with doWork() and stop… #2130
base: master
Are you sure you want to change the base?
Conversation
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.
Great job on following the checklist guidelines and structuring the MainApp class! Your code is well-organized, and no critical issues were found. Keep up the good work! 🌟 Remember, clear and informative messages in your code can enhance readability and maintenance, so consider incorporating the feedback about informative messages in future updates. 👍
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Bulldozer is starting 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.
The message in doWork
method should be more informative and indicate the type of machine that is working. Consider including the class name in the message.
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Bulldozer has stopped working."); |
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.
Similarly, the message in stopWork
method should also be more informative. It should clearly indicate which machine has stopped working.
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Excavator is starting 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.
The message should be more informative and indicate that it is an Excavator
that is working. Consider including the class name in the message.
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Excavator has stopped working."); |
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.
Similarly, the stop message should be more informative. Make sure it clearly indicates that it is an Excavator
that has stopped working.
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Truck is starting 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.
The message printed should be more informative and indicate that it is a Truck that is working. Consider specifying the type of machine in the message, for example: 'Truck started its work.'
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Truck has stopped working."); |
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.
Similarly, the stop message should also be more informative. Consider changing it to 'Truck has stopped its work.' to clearly indicate the type of machine.
package core.basesyntax; | ||
|
||
public class Bulldozer 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.
Please don't add redundant empty lines to your code.
check everywhere
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.
Done
…Work() methods