From 548668ea58dc9b133487582be79be68a6a559d54 Mon Sep 17 00:00:00 2001 From: Nazar Date: Fri, 28 Jul 2023 16:05:55 +0300 Subject: [PATCH] BUILD SUCCESS --- src/main/java/core/basesyntax/Bulldozer.java | 2 ++ src/main/java/core/basesyntax/Excavator.java | 2 ++ src/main/java/core/basesyntax/Machine.java | 3 +++ src/main/java/core/basesyntax/MainApp.java | 1 + src/main/java/core/basesyntax/Truck.java | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index 3f4afc9fd..db59e5b08 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -1,9 +1,11 @@ package core.basesyntax; + public class Bulldozer extends Machine { @Override public void doWork() { System.out.println("Bulldozer machine started its work"); } + @Override public void stopWork() { System.out.println("Bulldozer machine stopped its work"); diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index 81b68d585..a7d21f6cc 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -1,9 +1,11 @@ package core.basesyntax; + public class Excavator extends Machine { @Override public void doWork() { System.out.println("Excavator machine started its work"); } + @Override public void stopWork() { System.out.println("Excavator machine stopped its work"); diff --git a/src/main/java/core/basesyntax/Machine.java b/src/main/java/core/basesyntax/Machine.java index 584a9aaeb..4aea2f871 100644 --- a/src/main/java/core/basesyntax/Machine.java +++ b/src/main/java/core/basesyntax/Machine.java @@ -1,5 +1,8 @@ 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 08edb7fa9..0f8ccb87e 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) { Machine truck = new Truck(); diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java index 6d21d9147..10fee3868 100644 --- a/src/main/java/core/basesyntax/Truck.java +++ b/src/main/java/core/basesyntax/Truck.java @@ -1,9 +1,11 @@ package core.basesyntax; + public class Truck extends Machine { @Override public void doWork() { System.out.println("Truck machine started its work"); } + @Override public void stopWork() { System.out.println("Truck machine stopped its work");