Skip to content

implement Machine group#2594

Open
Vladyslav19ua wants to merge 1 commit into
mate-academy:masterfrom
Vladyslav19ua:master
Open

implement Machine group#2594
Vladyslav19ua wants to merge 1 commit into
mate-academy:masterfrom
Vladyslav19ua:master

Conversation

@Vladyslav19ua

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary


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

Footnotes

  1. Rate AI review example

Comment on lines +7 to +8
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between methods. Checklist item #1 requires no empty lines after method signatures. Move @OverRide annotation directly after line 7's closing brace.

Comment on lines +7 to +8
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between methods. Checklist item #1 requires no empty lines after method signatures. Move @OverRide annotation directly after line 7's closing brace.

Machine [] machine = {new Bulldozer(), new Excavator(), new Truck()};
for (Machine value : machine) {
value.doWork();
value.stopWork();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between methods. Remove the blank line after line 7 and before line 9 - empty lines between methods are not needed.

public class MainApp {

public static void main(String[] args) {
Machine [] machine = {new Bulldozer(), new Excavator(), new Truck()};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between abstract method declarations. Remove the blank line after line 4 - no empty line needed between method signatures.


public abstract class Machine {
public abstract void doWork();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between two abstract method declarations - this violates checklist item #1 which requires no redundant empty lines after method signature

public void doWork() {
System.out.println("Truck started its work");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Redundant empty line between methods violates checklist item #1. Remove this blank line and move @OverRide directly after line 7's closing brace.

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