diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index f6c64daf3..ad701a041 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -1,4 +1,5 @@ package core.basesyntax; + public class Bulldozer extends Machine { public void doWork() { System.out.println("Bulldozer started its work"); diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index 13f0dd509..6c75bec88 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -1,4 +1,5 @@ package core.basesyntax; + public class Excavator extends Machine { public void doWork() { System.out.println("Excavator started its work"); diff --git a/src/main/java/core/basesyntax/Machine.java b/src/main/java/core/basesyntax/Machine.java index 70849b4f7..4219699a5 100644 --- a/src/main/java/core/basesyntax/Machine.java +++ b/src/main/java/core/basesyntax/Machine.java @@ -1,5 +1,7 @@ package core.basesyntax; + public abstract class Machine { public abstract void doWork(); + public abstract void stopWork(); } diff --git a/src/main/java/core/basesyntax/MainApp.java b/src/main/java/core/basesyntax/MainApp.java index 8dd1a5acc..f40caabf9 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -1,4 +1,5 @@ package core.basesyntax; + public class MainApp { public static void main(String[] args) { diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java index b5958a1a5..802949820 100644 --- a/src/main/java/core/basesyntax/Truck.java +++ b/src/main/java/core/basesyntax/Truck.java @@ -1,4 +1,5 @@ package core.basesyntax; + public class Truck extends Machine { public void doWork() { System.out.println("Truck started its work");