- Create class Machine containing methods
public abstract void doWork()
andpublic abstract void stopWork()
. - Create classes
Truck
,Bulldozer
, andExcavator
that will inherit fromMachine
. - In those classes override
doWork()
, so it will print a message that a certain machine started its work. - Override
stopWork()
as well. It should print messages that certain machines stopped working. - In the
MainApp
class create aMachine
array withTruck
,Bulldozer
, andExcavator
and call methodsdoWork()
andstopWork()
in a loop.
forked from mate-academy/jv-oop
-
Notifications
You must be signed in to change notification settings - Fork 0
jv_fx_serhii_slobodianiuk_java_core_OOP_Basic
serhii-slobodianiuk/jv-oop
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
jv_fx_serhii_slobodianiuk_java_core_OOP_Basic
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Java 100.0%