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

1. Created the classes Truck, Bulldozer, Excavator, which are inherit… #1776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CriticEnergy
Copy link

…ed from Machine. 2. Created a Machine class containing the public abstract void doWork() and public abstract void stopWork() methods. 3. In these classes, the doWork() function is overridden so that it prints a message that a particular machine has started its work. 4. Redefined stopWork(). It displays messages indicating that a specific machine has stopped working. 5. In the MainApp class, I created a Machine array with Truck, Bulldozer and Excavator and called the doWork() and stopWork() methods in a loop.

…ed from Machine. 2. Created a Machine class containing the public abstract void doWork() and public abstract void stopWork() methods. 3. In these classes, the doWork() function is overridden so that it prints a message that a particular machine has started its work. 4. Redefined stopWork(). It displays messages indicating that a specific machine has stopped working. 5. In the MainApp class, I created a Machine array with Truck, Bulldozer and Excavator and called the doWork() and stopWork() methods in a loop.

public abstract void stopWork();
}

Copy link

Choose a reason for hiding this comment

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

Suggested change

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