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

Created class Machine #2156

Closed
wants to merge 11 commits into from
Closed

Created class Machine #2156

wants to merge 11 commits into from

Conversation

Dima4no
Copy link

@Dima4no Dima4no commented Sep 22, 2024

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 implementing the Excavator class and MainApp.java according to the checklist! 🎉 While the messages in the methods could be more informative, this is a minor issue and doesn't significantly impact the functionality of your code. Keep up the good work, and consider enhancing the messages for better clarity in future updates! 👍

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

public class Bulldozer extends Machine {

public void doWork() {
System.out.println("Bulldozer 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 should indicate what type of Machine is working right now. Consider including the class name in the message for clarity, e.g., 'Bulldozer is working.'

}

public void stopWork() {
System.out.println("Bulldozer stopped working.");

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. Include the class name to clarify which machine stopped, e.g., 'Bulldozer has stopped working.'

public class Excavator extends Machine {

public void doWork() {
System.out.println("Excavator 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 'doWork' method should be more informative. It should indicate that it is an Excavator that has started working. Consider including the type of machine in the message.

}

public void stopWork() {
System.out.println("Excavator stopped working.");

Choose a reason for hiding this comment

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

Similar to the 'doWork' method, the message in 'stopWork' should also be more informative. Make sure it indicates that it is an Excavator that has stopped working.

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

abstract class Machine {

Choose a reason for hiding this comment

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

According to the checklist, class elements should have appropriate access modifiers. Consider if the abstract class Machine should be public to be accessible by other classes in different packages.

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

class Truck extends Machine {

Choose a reason for hiding this comment

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

The class Truck should be declared as public to match the visibility of its superclass Machine and to be accessible from other packages.

class Truck extends Machine {
@Override
public void doWork() {
System.out.println("Truck 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 doWork method is not informative enough. It should indicate that the 'Truck' is the type of Machine that is working now. For example: "Truck is doing its work."

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

public void stopWork() {

Choose a reason for hiding this comment

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

The stopWork method should be annotated with @Override to clearly indicate that it is overriding a method from the superclass Machine.

}

public void stopWork() {
System.out.println("Truck 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 stopWork method is not informative enough. It should indicate that the 'Truck' is the type of Machine that has stopped working. For example: "Truck has stopped its work."

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.

package core.basesyntax;

public class Excavator extends Machine {

Choose a reason for hiding this comment

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

same

package core.basesyntax;

abstract class Machine {

Choose a reason for hiding this comment

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

same

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

abstract class Machine {

Choose a reason for hiding this comment

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

Suggested change
abstract class Machine {
public abstract class Machine {

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

class Truck extends Machine {

Choose a reason for hiding this comment

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

Suggested change
class Truck extends Machine {
public class Truck extends Machine {

@Dima4no Dima4no closed this Sep 30, 2024
@Dima4no Dima4no reopened this Sep 30, 2024
@Dima4no Dima4no closed this Sep 30, 2024
@Dima4no Dima4no reopened this Sep 30, 2024
@Dima4no Dima4no marked this pull request as draft September 30, 2024 08:19
@Dima4no Dima4no closed this Sep 30, 2024
@Dima4no Dima4no reopened this Sep 30, 2024
@Dima4no Dima4no marked this pull request as ready for review September 30, 2024 08:37
@Dima4no Dima4no closed this by deleting the head repository Sep 30, 2024
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