Skip to content

PR#1#2531

Open
HannaDevnina wants to merge 7 commits intomate-academy:masterfrom
HannaDevnina:mate-hw1
Open

PR#1#2531
HannaDevnina wants to merge 7 commits intomate-academy:masterfrom
HannaDevnina:mate-hw1

Conversation

@HannaDevnina
Copy link

Create the Machine class with doWork() and stopWork() methods.
Add child classes Truck, Bulldozer, and Excavator, each overriding doWork() and stopWork().
In MainApp, initialize an array of these objects and loop through them to call their methods.

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.

Review Summary

Great job on this task! I am approving your solution as it correctly implements all the requirements for inheritance and polymorphism. The class structure is well-designed, and the MainApp correctly demonstrates how to work with different machine types through an abstract reference.

For future improvements, pay attention to code cleanliness. I noticed an unused import in src/main/java/core/basesyntax/Machine.java that can be removed. Also, try to avoid extra blank lines at the end of files to keep your code neat.

Overall, this is a solid implementation. Keep up the great work!


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

Footnotes

  1. Rate AI review example

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

import jdk.dynalink.linker.GuardedInvocationTransformer;

Choose a reason for hiding this comment

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

This import is not used within the file and can be removed. Keeping your code free of unused imports makes it cleaner and easier to read.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed this in 047f955 commit

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.

2 participants