Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 647 Bytes

README.md

File metadata and controls

9 lines (7 loc) · 647 Bytes

jv-oop

  • Create class Machine containing methods public abstract void doWork() and public abstract void stopWork().
  • Create classes Truck, Bulldozer, and Excavator that will inherit from Machine.
  • 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 a Machine array with Truck, Bulldozer, and Excavator and call methods doWork() and stopWork() in a loop.