From 55822b736841600d944c3b67c7eef5dfcbf8a903 Mon Sep 17 00:00:00 2001 From: Dima Date: Mon, 30 Sep 2024 16:18:05 +0800 Subject: [PATCH] Implement changes --- src/main/java/core/basesyntax/Bulldozer.java | 1 + src/main/java/core/basesyntax/Excavator.java | 1 + src/main/java/core/basesyntax/Machine.java | 1 + src/main/java/core/basesyntax/Truck.java | 1 + 4 files changed, 4 insertions(+) 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."); }