From 52235fcad1952eb65b73150acd22ddfafe20cab5 Mon Sep 17 00:00:00 2001 From: valerpan Date: Sun, 19 Jul 2026 00:27:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 3 + .idea/encodings.xml | 7 + .idea/misc.xml | 14 ++ .idea/uiDesigner.xml | 124 ++++++++++++++++++ .idea/vcs.xml | 6 + src/main/java/animals/Animal.java | 2 +- .../{Carnivore.java => Carnivorous.java} | 6 +- src/main/java/animals/carnivores/Bear.java | 4 +- src/main/java/animals/carnivores/Fish.java | 4 +- src/main/java/animals/carnivores/Kotik.java | 4 +- src/main/java/employee/Worker.java | 2 + 11 files changed, 166 insertions(+), 10 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/uiDesigner.xml create mode 100644 .idea/vcs.xml rename src/main/java/animals/{Carnivore.java => Carnivorous.java} (81%) diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ae9c995 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main/java/animals/Animal.java b/src/main/java/animals/Animal.java index 824cc84..47e7996 100644 --- a/src/main/java/animals/Animal.java +++ b/src/main/java/animals/Animal.java @@ -4,7 +4,7 @@ import food.Food; public abstract class Animal { private String name; - private int satiety; + public int satiety; public String getName(){ return this.name; diff --git a/src/main/java/animals/Carnivore.java b/src/main/java/animals/Carnivorous.java similarity index 81% rename from src/main/java/animals/Carnivore.java rename to src/main/java/animals/Carnivorous.java index 854a732..c1439f4 100644 --- a/src/main/java/animals/Carnivore.java +++ b/src/main/java/animals/Carnivorous.java @@ -2,11 +2,11 @@ package animals; import food.Food; import food.Meat; -public abstract class Carnivore extends Animal{ +public abstract class Carnivorous extends Animal{ - public Carnivore() {} + public Carnivorous() {} - public Carnivore(String name) { + public Carnivorous(String name) { super(name); } diff --git a/src/main/java/animals/carnivores/Bear.java b/src/main/java/animals/carnivores/Bear.java index 997933a..b4666e0 100644 --- a/src/main/java/animals/carnivores/Bear.java +++ b/src/main/java/animals/carnivores/Bear.java @@ -1,9 +1,9 @@ package animals.carnivores; -import animals.Carnivore; +import animals.Carnivorous; import animals.Run; import animals.Voice; -public class Bear extends Carnivore implements Run, Voice { +public class Bear extends Carnivorous implements Run, Voice { public Bear(String name) { super(name); diff --git a/src/main/java/animals/carnivores/Fish.java b/src/main/java/animals/carnivores/Fish.java index 2aabb6c..2e0bc36 100644 --- a/src/main/java/animals/carnivores/Fish.java +++ b/src/main/java/animals/carnivores/Fish.java @@ -1,8 +1,8 @@ package animals.carnivores; -import animals.Carnivore; +import animals.Carnivorous; import animals.Swim; -public class Fish extends Carnivore implements Swim { +public class Fish extends Carnivorous implements Swim { public Fish(String name) { super(name); diff --git a/src/main/java/animals/carnivores/Kotik.java b/src/main/java/animals/carnivores/Kotik.java index 8ef1161..b349122 100644 --- a/src/main/java/animals/carnivores/Kotik.java +++ b/src/main/java/animals/carnivores/Kotik.java @@ -1,9 +1,9 @@ package animals.carnivores; -import animals.Carnivore; +import animals.Carnivorous; import animals.Run; import animals.Voice; -public class Kotik extends Carnivore implements Run, Voice { +public class Kotik extends Carnivorous implements Run, Voice { public Kotik(String name) { super(name); diff --git a/src/main/java/employee/Worker.java b/src/main/java/employee/Worker.java index a9be3af..d1a7453 100644 --- a/src/main/java/employee/Worker.java +++ b/src/main/java/employee/Worker.java @@ -40,6 +40,8 @@ public class Worker { } } + public Worker(){}; + public Worker(String name){ setName(name); }