From 07a6c252b3074a3c2675ccc080f2741c57d80f49 Mon Sep 17 00:00:00 2001 From: Volodymyr Skvira Date: Mon, 7 Aug 2023 12:42:23 +0300 Subject: [PATCH] Fixed checkstyle mistakes --- src/main/java/core/basesyntax/Excavator.java | 2 +- src/main/java/core/basesyntax/Machine.java | 1 + src/main/java/core/basesyntax/MainApp.java | 2 +- src/main/java/core/basesyntax/Truck.java | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index 78020cc30..9bc0af2e3 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -1,6 +1,6 @@ package core.basesyntax; -public class Excavator extends Machine{ +public class Excavator extends Machine { @Override public void doWork() { System.out.println("Excavator started 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/MainApp.java b/src/main/java/core/basesyntax/MainApp.java index 09e5f2e09..b5975be24 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -1,7 +1,7 @@ package core.basesyntax; public class MainApp { - public void doWork () { + public void doWork() { Machine[] machines = {new Truck(), new Bulldozer(), new Excavator()}; for (int i = 0; i < machines.length; i++) { machines[i].doWork(); diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java index f6e13f43e..50bf62071 100644 --- a/src/main/java/core/basesyntax/Truck.java +++ b/src/main/java/core/basesyntax/Truck.java @@ -1,6 +1,6 @@ package core.basesyntax; -public class Truck extends Machine{ +public class Truck extends Machine { @Override public void doWork() { System.out.println("Truck started working");