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 abstract class Machine and abstract methods for this class … #2174

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

Conversation

nikolasdymchenko7
Copy link

Description:

  • Created abstract class Machine and abstract methods for this class doWork(), stopWork()
  • Created new classes: Bulldozer, Excavator, Truck and extended them from the superclass Machine
  • Overridden methods: doWork() and stopWork() for each subclass
  • updated class MainApp:
    • added new Machine array with Truck, Bulldozer and Excavator and call methods doWork() and stopWork() in a loop

…doWork(), stopWork()

- Created new classes: Bulldozer, Excavator, Truck and extended them from the superclass Machine
- Overridden methods: doWork() and stopWork() for each subclass
- updated class MainApp:
  - added new Machine array with Truck, Bulldozer and Excavator and call methods doWork() and stopWork() in a loop
Comment on lines 4 to 8

public Bulldozer() {

}

Choose a reason for hiding this comment

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

Suggested change
public Bulldozer() {
}

remove this code

Comment on lines 4 to 8

public Excavator() {

}

Choose a reason for hiding this comment

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

Suggested change
public Excavator() {
}

same here

Comment on lines 4 to 8

public Machine() {

}

Choose a reason for hiding this comment

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

Suggested change
public Machine() {
}

remove

Comment on lines 4 to 8

public Truck() {

}

Choose a reason for hiding this comment

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

Suggested change
public Truck() {
}

same here

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.

Copy link
Author

Choose a reason for hiding this comment

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

@Elena-Bruyako unfortunately, I couldn't remove the spaces between the package name and the class name because it's a code style (mvn clean package shows me an error message when I do that). In other places I removed the extra spaces.

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