From cb7efffb80e62d2cd75842e7484618fc9c2ed233 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 12 Aug 2024 15:13:12 +0200 Subject: [PATCH 1/6] Final solution --- src/main/java/core/basesyntax/Bulldozer.java | 17 ++++++++++++ src/main/java/core/basesyntax/Excavator.java | 16 ++++++++++++ src/main/java/core/basesyntax/Machine.java | 6 +++++ src/main/java/core/basesyntax/MainApp.java | 27 ++++++++++++++++++++ src/main/java/core/basesyntax/Truck.java | 16 ++++++++++++ 5 files changed, 82 insertions(+) create mode 100644 src/main/java/core/basesyntax/Bulldozer.java create mode 100644 src/main/java/core/basesyntax/Excavator.java create mode 100644 src/main/java/core/basesyntax/Machine.java create mode 100644 src/main/java/core/basesyntax/Truck.java diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java new file mode 100644 index 000000000..3f1e5af3a --- /dev/null +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -0,0 +1,17 @@ +package core.basesyntax; + +public class Bulldozer extends Machine{ + + + @Override + public void doWork() { + System.out.println("Bulldozer start working!"); + } + + @Override + public void stopWork() { + System.out.println("Bulldozer stop working!"); + + } + +} diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java new file mode 100644 index 000000000..2389ef667 --- /dev/null +++ b/src/main/java/core/basesyntax/Excavator.java @@ -0,0 +1,16 @@ +package core.basesyntax; + +public class Excavator extends Machine { + + + @Override + public void doWork() { + System.out.println("Excavator start working!"); + } + + @Override + public void stopWork() { + System.out.println("Excavator stop working!"); + + } +} diff --git a/src/main/java/core/basesyntax/Machine.java b/src/main/java/core/basesyntax/Machine.java new file mode 100644 index 000000000..5a62715c2 --- /dev/null +++ b/src/main/java/core/basesyntax/Machine.java @@ -0,0 +1,6 @@ +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 f99e9a019..1637d72b0 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -1,5 +1,32 @@ package core.basesyntax; public class MainApp { + public static void main(String[] args) { + Machine truck; + truck = new Truck(); + Machine bulldozer = new Bulldozer(); + + Machine excavator = new Excavator(); + //tablica z obiektami + + Machine[] carPark = {truck , bulldozer , excavator }; + + // stworzyc petle for ktora wyswietli do i stop work + + for (int i = 0; i < carPark.length; i++) { + carPark[i].doWork(); + carPark[i].stopWork(); + + + } + + + // stworzyc maszyny z podanych wczesniej 3 typow + // i sprawdzic czy wywietlaja sie wiadomosci na konsoli + + + + } } + diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java new file mode 100644 index 000000000..83e179494 --- /dev/null +++ b/src/main/java/core/basesyntax/Truck.java @@ -0,0 +1,16 @@ +package core.basesyntax; + +public class Truck extends Machine { + + @Override + public void doWork() { + System.out.println("Truck start working!"); + + } + + @Override + public void stopWork() { + System.out.println("Truck stop working!"); + + } +} From f33d8e9f2b29958985eb6c3bc2ba1c03b935ff5d Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 12 Aug 2024 21:04:04 +0200 Subject: [PATCH 2/6] Solution --- src/main/java/core/basesyntax/Bulldozer.java | 2 +- src/main/java/core/basesyntax/Excavator.java | 1 - src/main/java/core/basesyntax/Machine.java | 2 + src/main/java/core/basesyntax/MainApp.java | 11 +- tatus | 143 +++++++++++++++++++ 5 files changed, 147 insertions(+), 12 deletions(-) create mode 100644 tatus diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index 3f1e5af3a..3b5912239 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -1,6 +1,6 @@ package core.basesyntax; -public class Bulldozer extends Machine{ +public class Bulldozer extends Machine { @Override diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index 2389ef667..e43fb6953 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -11,6 +11,5 @@ public void doWork() { @Override public void stopWork() { System.out.println("Excavator stop working!"); - } } diff --git a/src/main/java/core/basesyntax/Machine.java b/src/main/java/core/basesyntax/Machine.java index 5a62715c2..4aea2f871 100644 --- a/src/main/java/core/basesyntax/Machine.java +++ b/src/main/java/core/basesyntax/Machine.java @@ -1,6 +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 1637d72b0..018f81377 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -10,23 +10,14 @@ public static void main(String[] args) { Machine excavator = new Excavator(); //tablica z obiektami - Machine[] carPark = {truck , bulldozer , excavator }; + Machine[] carPark = {truck, bulldozer, excavator }; // stworzyc petle for ktora wyswietli do i stop work for (int i = 0; i < carPark.length; i++) { carPark[i].doWork(); carPark[i].stopWork(); - - } - - - // stworzyc maszyny z podanych wczesniej 3 typow - // i sprawdzic czy wywietlaja sie wiadomosci na konsoli - - - } } diff --git a/tatus b/tatus new file mode 100644 index 000000000..734c80ab4 --- /dev/null +++ b/tatus @@ -0,0 +1,143 @@ +commit 0c81ce0b461e8c939bd8a60137239a4e107d0b03 (HEAD -> Develop, origin/master, origin/HEAD, origin/Develop, master) +Author: Bohdan Chupika +Date: Mon Nov 13 13:02:43 2023 +0200 + + remove encoding config from checkstyle plugin + +commit 57f404cf9e15b11c12c81a0766317a7e4b5c4449 +Author: Bohdan Chupika +Date: Thu Oct 12 14:39:07 2023 +0300 + + update checklist.md reference (#1715) + +commit 60029bc4a0bd746e76da47cad2b7942614078d70 +Author: Bohdan Chupika +Date: Mon Sep 25 18:20:05 2023 +0300 + + change version to JDK 17 in pom.xml (#1675) + +commit ea616afcf6501b73aafc673ab4d28eeb844f9579 +Author: Mykyta Oleksin <32339836+nacenik@users.noreply.github.com> +Date: Fri May 12 10:15:08 2023 +0300 + + Update ci.yml to java 17 + +commit 0dbf4f5600d918d6ab74af75a52982e13283fd37 +Author: Liliia Ponomarenko <96740815+liliia-ponomarenko@users.noreply.github.com> +Date: Thu Apr 27 13:12:37 2023 +0300 + + Create checklist.md + +commit 68b23a82742c97bf6f5e18135807f4a8ad155382 +Merge: 94f3d3c 2ee36c5 +Author: Dasha +Date: Tue Dec 27 11:15:17 2022 +0200 + + Merge pull request #1176 from mate-academy/change_class_name_in_readme + +commit 2ee36c5ad526f374b70410ed77babc1a5b3c66b6 +Author: Dasha +Date: Tue Dec 27 11:13:49 2022 +0200 + + changed class name in readme + +commit 94f3d3c715cd63c89ae671303b998a480436c7c4 +Author: Sofia Diakonova <36365171+Sofasmile@users.noreply.github.com> +Date: Tue Mar 29 08:19:20 2022 +0200 + + changed task description (#650) + + * changed task description + + * corrected style + +commit 17bec63f99675b384f8e34ca267723f32695db4d +Author: resci +Date: Tue Nov 23 08:36:08 2021 +0200 + + Update CI config + +commit 95eeb7c950750c9f0be14e3c8fd8bd9271827e4f +Author: resci +Date: Mon Nov 22 19:36:59 2021 +0200 + + Migrate from Travis to Github Actions + +commit e3a95855cfd1b18a054273423a3a95a3fe772d8f +Author: Bohdan Chupika +Date: Wed Jun 16 07:34:24 2021 +0300 + + Update .travis.yml + +commit 93cce817c5474ceadd882e30885b11073ee53a55 +Merge: e803478 c8e194e +Author: KseniiaMakarova <59459757+KseniiaMakarova@users.noreply.github.com> +Date: Mon Apr 5 09:51:30 2021 +0300 + + Merge pull request #257 from mate-academy/fix-spelling-mistake + +commit c8e194e146284510b48bc912537a1cb266e09d96 +Author: kseniia_makarova +Date: Mon Apr 5 09:31:39 2021 +0300 + + fixed spelling mistake + +commit e803478aa06a87cdb4007740ed0aaf9e2b9807cd +Author: Sofia Diakonova <36365171+Sofasmile@users.noreply.github.com> +Date: Fri Nov 27 14:19:31 2020 +0200 + + update travis (#141) + + * update travis + + * removed redundant version + +commit 0eb658145075ee2052233459d6813aa9a953a4d7 +Author: RomanDubovskyi <58385506+RomanDubovskyi@users.noreply.github.com> +Date: Wed Nov 11 10:45:46 2020 +0200 + + translated description to end, added link to checklist (#140) + +commit 1bd489b5653f690334a482786472f6c6df7d3ad4 +Author: RomanDubovskyi <58385506+RomanDubovskyi@users.noreply.github.com> +Date: Mon Aug 3 14:14:25 2020 +0300 + + Task description refactoring (#138) + + * Fixed mistype + +commit a185cec108fd820c90a6e7fd89823b75a3414c90 +Author: Bohdan Chupika +Date: Tue Jul 28 17:03:59 2020 +0300 + + Update README.md + +commit e08f50247c6f3897f7f7e1750e85af8890cc0e23 +Author: Bohdan Chupika +Date: Tue Jul 28 17:03:26 2020 +0300 + + Update README.md + +commit a98e3e858037a8308c5bcd412036d30150509d46 +Author: Sofia Diakonova <36365171+Sofasmile@users.noreply.github.com> +Date: Thu Mar 26 11:59:08 2020 +0200 + + Update pom.xml + +commit 514027b37552bc0dda1e74feae91fa62e3dee0dc +Author: Bohdan Chupika +Date: Mon Oct 28 16:46:33 2019 +0200 + + Update pom.xml + +commit 0970691b6cf93d2b40aea908eb772a97465b3bd0 +Author: Bohdan Chupika +Date: Mon Oct 28 16:38:48 2019 +0200 + + added hw instructions + +commit c6c4d4450d0ba499b1ba4c881cf6181499df8ce7 +Author: Bohdan Chupika +Date: Mon Oct 28 16:33:37 2019 +0200 + + Initial commit From f7a258fad26341ea9cf4d323a2d75ec441e38090 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 7 Sep 2024 18:09:47 +0200 Subject: [PATCH 3/6] Second solution --- src/main/java/core/basesyntax/Bulldozer.java | 1 - src/main/java/core/basesyntax/Excavator.java | 1 - 2 files changed, 2 deletions(-) diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index 3b5912239..4959026fc 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -2,7 +2,6 @@ public class Bulldozer extends Machine { - @Override public void doWork() { System.out.println("Bulldozer start working!"); diff --git a/src/main/java/core/basesyntax/Excavator.java b/src/main/java/core/basesyntax/Excavator.java index e43fb6953..093bf72fd 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -2,7 +2,6 @@ public class Excavator extends Machine { - @Override public void doWork() { System.out.println("Excavator start working!"); From 39c0ea2bb90934dc21aa627e78d31a42b513e98c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 7 Sep 2024 18:28:17 +0200 Subject: [PATCH 4/6] Second soluion --- qodana.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 qodana.yaml diff --git a/qodana.yaml b/qodana.yaml new file mode 100644 index 000000000..0165dedf9 --- /dev/null +++ b/qodana.yaml @@ -0,0 +1,31 @@ +#-------------------------------------------------------------------------------# +# Qodana analysis is configured by qodana.yaml file # +# https://www.jetbrains.com/help/qodana/qodana-yaml.html # +#-------------------------------------------------------------------------------# +version: "1.0" + +#Specify inspection profile for code analysis +profile: + name: qodana.starter + +#Enable inspections +#include: +# - name: + +#Disable inspections +#exclude: +# - name: +# paths: +# - + +projectJDK: 22 #(Applied in CI/CD pipeline) + +#Execute shell command before Qodana execution (Applied in CI/CD pipeline) +#bootstrap: sh ./prepare-qodana.sh + +#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline) +#plugins: +# - id: #(plugin id can be found at https://plugins.jetbrains.com) + +#Specify Qodana linter for analysis (Applied in CI/CD pipeline) +linter: jetbrains/qodana-jvm-community:latest From 0f79a6a325927afc8c66c44bc088c7a8443e4d08 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 3 Oct 2024 19:30:59 +0200 Subject: [PATCH 5/6] Third Solution --- src/main/java/core/basesyntax/Bulldozer.java | 4 ++-- src/main/java/core/basesyntax/Excavator.java | 4 ++-- src/main/java/core/basesyntax/MainApp.java | 7 ------- src/main/java/core/basesyntax/Truck.java | 4 ++-- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/core/basesyntax/Bulldozer.java b/src/main/java/core/basesyntax/Bulldozer.java index 4959026fc..51201e526 100644 --- a/src/main/java/core/basesyntax/Bulldozer.java +++ b/src/main/java/core/basesyntax/Bulldozer.java @@ -4,12 +4,12 @@ public class Bulldozer extends Machine { @Override public void doWork() { - System.out.println("Bulldozer start working!"); + System.out.println("The bulldozer has started working"); } @Override public void stopWork() { - System.out.println("Bulldozer stop working!"); + 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 093bf72fd..17c1d77c6 100644 --- a/src/main/java/core/basesyntax/Excavator.java +++ b/src/main/java/core/basesyntax/Excavator.java @@ -4,11 +4,11 @@ public class Excavator extends Machine { @Override public void doWork() { - System.out.println("Excavator start working!"); + System.out.println("Excavator has started working!"); } @Override public void stopWork() { - System.out.println("Excavator stop working!"); + System.out.println("Excavator has finished digging!"); } } diff --git a/src/main/java/core/basesyntax/MainApp.java b/src/main/java/core/basesyntax/MainApp.java index 018f81377..e023ff65a 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -4,16 +4,9 @@ public class MainApp { public static void main(String[] args) { Machine truck; truck = new Truck(); - Machine bulldozer = new Bulldozer(); - Machine excavator = new Excavator(); - //tablica z obiektami - Machine[] carPark = {truck, bulldozer, excavator }; - - // stworzyc petle for ktora wyswietli do i stop work - for (int i = 0; i < carPark.length; i++) { carPark[i].doWork(); carPark[i].stopWork(); diff --git a/src/main/java/core/basesyntax/Truck.java b/src/main/java/core/basesyntax/Truck.java index 83e179494..5e8f926fe 100644 --- a/src/main/java/core/basesyntax/Truck.java +++ b/src/main/java/core/basesyntax/Truck.java @@ -4,13 +4,13 @@ public class Truck extends Machine { @Override public void doWork() { - System.out.println("Truck start working!"); + System.out.println("Truck has started working!"); } @Override public void stopWork() { - System.out.println("Truck stop working!"); + System.out.println("Truck has stopped working!"); } } From e155538dc825bdb033a910e4c77bbaa6484ba179 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 3 Oct 2024 21:03:05 +0200 Subject: [PATCH 6/6] 4th solution --- src/main/java/core/basesyntax/MainApp.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/core/basesyntax/MainApp.java b/src/main/java/core/basesyntax/MainApp.java index e023ff65a..6a0157852 100644 --- a/src/main/java/core/basesyntax/MainApp.java +++ b/src/main/java/core/basesyntax/MainApp.java @@ -1,6 +1,7 @@ package core.basesyntax; public class MainApp { + public static void main(String[] args) { Machine truck; truck = new Truck();