Skip to content

Commit

Permalink
Use machines to print working progress messages
Browse files Browse the repository at this point in the history
  • Loading branch information
euulu committed Dec 11, 2024
1 parent 5a0549b commit 78e9ec2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/core/basesyntax/MainApp.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package core.basesyntax;

public class MainApp {

public static void main(String[] args) {
Machine truck = new Truck();
Machine bulldozer = new Bulldozer();
Machine excavator = new Excavator();
Machine[] machines = new Machine[]{truck, bulldozer, excavator};
for (Machine machine : machines) {
machine.doWork();
machine.stopWork();
}
}
}

0 comments on commit 78e9ec2

Please sign in to comment.