-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: master
Are you sure you want to change the base?
- Created abstract class Machine and abstract methods for this class … #2174
Conversation
…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
|
||
public Bulldozer() { | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Bulldozer() { | |
} |
remove this code
|
||
public Excavator() { | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Excavator() { | |
} |
same here
|
||
public Machine() { | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Machine() { | |
} |
remove
|
||
public Truck() { | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public Truck() { | |
} |
same here
package core.basesyntax; | ||
|
||
public class Bulldozer extends Machine { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't add redundant empty lines to your code.
check other places
There was a problem hiding this comment.
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.
Description: