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); }