Skip to content

Commit

Permalink
refactoring after mentor's review
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarmadev committed Aug 17, 2024
1 parent 9da5c96 commit 1228eef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/Bulldozer.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
public class Bulldozer extends Machine {
@Override
public void doWork() {
System.out.println("Machine \"Bulldozer\" started work");
System.out.println("\"Bulldozer\" is now working");
}

@Override
public void stopWork() {
System.out.println("Machine \"Bulldozer\" stopped work");
System.out.println("\"Bulldozer\" has stopped working");
}
}
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/Excavator.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
public class Excavator extends Machine {
@Override
public void doWork() {
System.out.println("Machine \"Excavator\" started work");
System.out.println("\"Excavator\" is now working");
}

@Override
public void stopWork() {
System.out.println("Machine \"Excavator\" stopped work");
System.out.println("\"Excavator\" has stopped working");
}
}
6 changes: 3 additions & 3 deletions src/main/java/core/basesyntax/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public static void main(String[] args) {

Machine[] machines = {truck, bulldozer, excavator};

for (Machine cur : machines) {
cur.doWork();
cur.stopWork();
for (Machine vehicle : machines) {
vehicle.doWork();
vehicle.stopWork();
}
}
}
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/Truck.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
public class Truck extends Machine {
@Override
public void doWork() {
System.out.println("Machine \"Truck\" started work");
System.out.println("\"Truck\" is now working");
}

@Override
public void stopWork() {
System.out.println("Machine \"Truck\" stopped work");
System.out.println("\"Truck\" has stopped working");
}
}

0 comments on commit 1228eef

Please sign in to comment.