-
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
Final solution #2107
base: master
Are you sure you want to change the base?
Final solution #2107
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.
Hey there! It looks like there are a few key areas in the code that need a bit of tweaking. Specifically, the messages for the different machines starting and stopping aren't as clear as they could be. Making them more informative will really help anyone reading the logs understand what's going on. Also, watch out for those extra empty lines and missing spaces – cleaning these up will make your code look neat and professional. Keep up the good work, and with these changes, your code will be in tip-top shape! 👍💻
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
@@ -0,0 +1,17 @@ | |||
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.
There should be a space between the class name and the curly brace to follow the Java code conventions.
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Bulldozer start 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.
The message in 'System.out.println' should be more informative. It should indicate that it is a 'Bulldozer' that is working. Although the message does include 'Bulldozer', consider rephrasing to 'The bulldozer has started working' to be more descriptive.
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Bulldozer stop 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.
The message in 'System.out.println' should be more informative. It should indicate that it is a 'Bulldozer' that has stopped working. Consider rephrasing to 'The bulldozer has stopped working' to be more descriptive.
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Excavator start 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.
The message "Excavator start working!" should be more informative and indicate that it is an Excavator that is working. Consider specifying the action the Excavator is performing, for example, "Excavator is digging."
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Excavator stop 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 "Excavator stop working!" should be more informative. It could be improved to "Excavator has finished digging." to clearly indicate the state of the Excavator.
|
||
Machine[] carPark = {truck , bulldozer , excavator }; | ||
|
||
// stworzyc petle for ktora wyswietli do i stop 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.
Please don't add redundant empty lines to your code. We don't need them after class declaration or method signature.
carPark[i].doWork(); | ||
carPark[i].stopWork(); | ||
|
||
|
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. We don't need them after class declaration or method signature.
// stworzyc maszyny z podanych wczesniej 3 typow | ||
// i sprawdzic czy wywietlaja sie wiadomosci na konsoli | ||
|
||
|
||
|
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 remove these redundant empty lines to improve the readability of your code.
|
||
@Override | ||
public void doWork() { | ||
System.out.println("Truck start 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.
The message 'Truck start working!' should be more informative and indicate that it's a Truck that is working. Consider rephrasing it to include the type of machine, for example: 'Truck is now working.'
|
||
@Override | ||
public void stopWork() { | ||
System.out.println("Truck stop 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 'Truck stop working!' should clearly indicate the machine type. You could rephrase it to 'Truck has stopped working.' to make it more informative.
i think job is done why i can`t pass the task |
co jest nie tak z zadaniem, zebym mogl je poprawic? |
No description provided.