diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index 861882c45..7fd8697a2 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -5,6 +5,7 @@ public class Bulldozer extends Machine { public void doWork() { System.out.println("Bulldozer started its work."); } + public void stopWork() { System.out.println("Bulldozer has stopped working."); } diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index f973cf5d3..e1aff2b15 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -5,6 +5,7 @@ public class Excavator extends Machine { public void doWork() { System.out.println("Excavator started its work."); } + public void stopWork() { System.out.println("Excavator has stopped working."); } diff --git a/src/main/java/core/basesyntax/Machine.java b/src/main/java/core/basesyntax/Machine.java index 5a62715c2..cad5be453 100644 --- a/src/main/java/core/basesyntax/Machine.java +++ b/src/main/java/core/basesyntax/Machine.java @@ -2,5 +2,6 @@ public abstract class Machine { public abstract void doWork(); + public abstract void stopWork(); } diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java index defc4fce8..5f24ab0f7 100644 --- a/src/main/java/core/basesyntax/Truck.java +++ b/src/main/java/core/basesyntax/Truck.java @@ -6,6 +6,7 @@ public class Truck extends Machine { public void doWork() { System.out.println("Truck started its work."); } + public void stopWork() { System.out.println("Truck has stopped working."); }