Skip to content
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

Creating machines arrays and loop #2159

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

SwtLouisiana
Copy link

No description provided.

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.

Great job on defining the abstract class Machine and using polymorphism in MainApp.java! Just a small note for the future: try to keep your code tidy by removing unnecessary empty lines. It's a minor detail but helps in maintaining a clean and professional codebase. Keep up the good work! 👍💻

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

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

public class Bulldozer extends Machine{

Choose a reason for hiding this comment

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

There should not be an empty line after the class declaration. Please remove the redundant empty line to comply with the coding standards.

public class Bulldozer extends Machine{
@Override
public void doWork() {
System.out.println("Bulldozer machine started its work.");

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 and indicate the type of machine. Consider specifying that it is a Bulldozer that has started working.

@Override
public void stopWork() {

System.out.println("Bulldozer machines stopped working");

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 and indicate the type of machine. Consider specifying that it is a Bulldozer that has stopped working. Also, there's a typo in the word 'machines', it should be singular 'machine'.

public class Excavator extends Machine {
@Override
public void doWork() {
System.out.println("Excavator machine started its work.");

Choose a reason for hiding this comment

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

The message in the 'doWork' method should be more informative and indicate that the 'Excavator' is working. For example, 'Excavator is starting its work.'

@Override
public void stopWork() {

System.out.println("Excavator machines stopped working");

Choose a reason for hiding this comment

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

The message in the 'stopWork' method should be more informative and indicate that the 'Excavator' has stopped working. Also, there is a typographical error, it should be 'Excavator machine' instead of 'Excavator machines'. For example, 'Excavator has stopped its work.'


machine.doWork();
machine.stopWork();

Choose a reason for hiding this comment

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

Remove the redundant empty line after the loop block to follow the checklist's best practices.

machine.stopWork();

}

Choose a reason for hiding this comment

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

Please remove the redundant empty line before the closing brace of the method.

}

}

}

Choose a reason for hiding this comment

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

Remove the redundant empty line before the closing brace of the class.

@Override
public void doWork() {

System.out.println("Truck machine started its work.");

Choose a reason for hiding this comment

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

The message in the doWork method should be more informative and indicate that it is a Truck that is working. Consider specifying that explicitly, for example: 'Truck is starting its work.'

@Override
public void stopWork() {

System.out.println("Truck machines stopped working");

Choose a reason for hiding this comment

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

Similarly, the message in the stopWork method should be more informative. It should indicate that it is a Truck that has stopped working. For instance: 'Truck has stopped working.'

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.

3 participants