commit 4877e7216057d04303d7f5c23217cd01574c8f53 Author: jm612fx Date: Sun Dec 18 20:11:50 2022 +0100 first push diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..eaf91e2 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0b5bf8d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..9ccff94 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..6d50cd4 --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..33e5488 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Cvicenia po 3. zadanie diff --git a/oop3.iml b/oop3.iml new file mode 100644 index 0000000..9465dd8 --- /dev/null +++ b/oop3.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/out/production/oop3/Main.class b/out/production/oop3/Main.class new file mode 100644 index 0000000..f7366e7 Binary files /dev/null and b/out/production/oop3/Main.class differ diff --git a/out/production/oop3/Space/Galaxia.class b/out/production/oop3/Space/Galaxia.class new file mode 100644 index 0000000..d0ea8a8 Binary files /dev/null and b/out/production/oop3/Space/Galaxia.class differ diff --git a/out/production/oop3/Space/Hmlovina.class b/out/production/oop3/Space/Hmlovina.class new file mode 100644 index 0000000..958101b Binary files /dev/null and b/out/production/oop3/Space/Hmlovina.class differ diff --git a/out/production/oop3/Space/SlnecnaSustava.class b/out/production/oop3/Space/SlnecnaSustava.class new file mode 100644 index 0000000..412bac9 Binary files /dev/null and b/out/production/oop3/Space/SlnecnaSustava.class differ diff --git a/out/production/oop3/Space/Vesmir.class b/out/production/oop3/Space/Vesmir.class new file mode 100644 index 0000000..659727b Binary files /dev/null and b/out/production/oop3/Space/Vesmir.class differ diff --git a/out/production/oop3/Space/VesmirneTelesa/Hviezda.class b/out/production/oop3/Space/VesmirneTelesa/Hviezda.class new file mode 100644 index 0000000..51b70e2 Binary files /dev/null and b/out/production/oop3/Space/VesmirneTelesa/Hviezda.class differ diff --git a/out/production/oop3/Space/VesmirneTelesa/Kometa.class b/out/production/oop3/Space/VesmirneTelesa/Kometa.class new file mode 100644 index 0000000..275a6e0 Binary files /dev/null and b/out/production/oop3/Space/VesmirneTelesa/Kometa.class differ diff --git a/out/production/oop3/Space/VesmirneTelesa/Planeta.class b/out/production/oop3/Space/VesmirneTelesa/Planeta.class new file mode 100644 index 0000000..645d521 Binary files /dev/null and b/out/production/oop3/Space/VesmirneTelesa/Planeta.class differ diff --git a/out/production/oop3/Space/VesmirneTelesa/Vesmirne_Teleso.class b/out/production/oop3/Space/VesmirneTelesa/Vesmirne_Teleso.class new file mode 100644 index 0000000..e127151 Binary files /dev/null and b/out/production/oop3/Space/VesmirneTelesa/Vesmirne_Teleso.class differ diff --git a/out/production/oop3/Space/VesmirneTelesa/Zem.class b/out/production/oop3/Space/VesmirneTelesa/Zem.class new file mode 100644 index 0000000..c5aea2b Binary files /dev/null and b/out/production/oop3/Space/VesmirneTelesa/Zem.class differ diff --git a/out/production/oop3/Zive_Tvory/Bezstavovce/Bezstavovec.class b/out/production/oop3/Zive_Tvory/Bezstavovce/Bezstavovec.class new file mode 100644 index 0000000..8f16050 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Bezstavovce/Bezstavovec.class differ diff --git a/out/production/oop3/Zive_Tvory/Bezstavovce/Chonotnica.class b/out/production/oop3/Zive_Tvory/Bezstavovce/Chonotnica.class new file mode 100644 index 0000000..321f5a1 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Bezstavovce/Chonotnica.class differ diff --git a/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.class b/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.class new file mode 100644 index 0000000..3ab203e Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.class differ diff --git a/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Mucha.class b/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Mucha.class new file mode 100644 index 0000000..a6d0c46 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Mucha.class differ diff --git a/out/production/oop3/Zive_Tvory/Bezstavovce/Meduza.class b/out/production/oop3/Zive_Tvory/Bezstavovce/Meduza.class new file mode 100644 index 0000000..da6c07c Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Bezstavovce/Meduza.class differ diff --git a/out/production/oop3/Zive_Tvory/Cicavce/Cicable.class b/out/production/oop3/Zive_Tvory/Cicavce/Cicable.class new file mode 100644 index 0000000..3ebed40 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Cicavce/Cicable.class differ diff --git a/out/production/oop3/Zive_Tvory/Cicavce/Cicavec.class b/out/production/oop3/Zive_Tvory/Cicavce/Cicavec.class new file mode 100644 index 0000000..956a1a8 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Cicavce/Cicavec.class differ diff --git a/out/production/oop3/Zive_Tvory/Cicavce/MaterskeMlieko.class b/out/production/oop3/Zive_Tvory/Cicavce/MaterskeMlieko.class new file mode 100644 index 0000000..20e0de7 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Cicavce/MaterskeMlieko.class differ diff --git a/out/production/oop3/Zive_Tvory/Clovecina/Clovek.class b/out/production/oop3/Zive_Tvory/Clovecina/Clovek.class new file mode 100644 index 0000000..8955a97 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Clovecina/Clovek.class differ diff --git a/out/production/oop3/Zive_Tvory/Clovecina/Muz.class b/out/production/oop3/Zive_Tvory/Clovecina/Muz.class new file mode 100644 index 0000000..504cd54 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Clovecina/Muz.class differ diff --git a/out/production/oop3/Zive_Tvory/Clovecina/Zena.class b/out/production/oop3/Zive_Tvory/Clovecina/Zena.class new file mode 100644 index 0000000..6431671 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Clovecina/Zena.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce.7z b/out/production/oop3/Zive_Tvory/Stavovce.7z new file mode 100644 index 0000000..e2903ba Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce.7z differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Kapor.class b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Kapor.class new file mode 100644 index 0000000..e93bec0 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Kapor.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Ryba.class b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Ryba.class new file mode 100644 index 0000000..c0d5e3e Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/Ryba.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Ryby/ZlataRybka.class b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/ZlataRybka.class new file mode 100644 index 0000000..d0a6652 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Ryby/ZlataRybka.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.class new file mode 100644 index 0000000..4e75f9a Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.class new file mode 100644 index 0000000..ccd8f19 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.class new file mode 100644 index 0000000..7690701 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.class new file mode 100644 index 0000000..a94e4a2 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.class new file mode 100644 index 0000000..81eba03 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.class new file mode 100644 index 0000000..28dcc9d Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.class new file mode 100644 index 0000000..f15c599 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.class new file mode 100644 index 0000000..431290f Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.class new file mode 100644 index 0000000..1996ca8 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.class new file mode 100644 index 0000000..1280fed Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.class new file mode 100644 index 0000000..00cacd4 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.class new file mode 100644 index 0000000..8d9a358 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.class new file mode 100644 index 0000000..0dfdc10 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.class new file mode 100644 index 0000000..ca5f77a Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.class new file mode 100644 index 0000000..b4f7e48 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.class new file mode 100644 index 0000000..6c16b6b Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.class new file mode 100644 index 0000000..fe21fb9 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.class new file mode 100644 index 0000000..1d0a2d3 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.class new file mode 100644 index 0000000..04e35de Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.class new file mode 100644 index 0000000..7acd382 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.class new file mode 100644 index 0000000..6ef8f8f Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Stavovec.class b/out/production/oop3/Zive_Tvory/Stavovce/Stavovec.class new file mode 100644 index 0000000..96c6e1d Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Stavovec.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Orol.class b/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Orol.class new file mode 100644 index 0000000..2d32b3b Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Orol.class differ diff --git a/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Vtak.class b/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Vtak.class new file mode 100644 index 0000000..7b05712 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Vtak.class differ diff --git a/out/production/oop3/Zive_Tvory/Tvor.class b/out/production/oop3/Zive_Tvory/Tvor.class new file mode 100644 index 0000000..2624c45 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/Tvor.class differ diff --git a/out/production/oop3/Zive_Tvory/bornable.class b/out/production/oop3/Zive_Tvory/bornable.class new file mode 100644 index 0000000..ab5b635 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/bornable.class differ diff --git a/out/production/oop3/Zive_Tvory/dieable.class b/out/production/oop3/Zive_Tvory/dieable.class new file mode 100644 index 0000000..68360e0 Binary files /dev/null and b/out/production/oop3/Zive_Tvory/dieable.class differ diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000..549a397 Binary files /dev/null and b/src/.DS_Store differ diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..6342b06 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,115 @@ +import Space.Hmlovina; +import Zive_Tvory.*; +import Zive_Tvory.Clovecina.Clovek; +import Zive_Tvory.Clovecina.Muz; +import Zive_Tvory.Clovecina.Zena; +import Zive_Tvory.Stavovce.Vtaky.Orol; +import Zive_Tvory.Stavovce.Ryby.Kapor; +import Zive_Tvory.Stavovce.Ryby.ZlataRybka; +import Zive_Tvory.Bezstavovce.Hmyz.Mucha; +import Zive_Tvory.Bezstavovce.Chonotnica; +import Zive_Tvory.Bezstavovce.Meduza; +import Space.Vesmir; +import Space.SlnecnaSustava; +import Space.VesmirneTelesa.Planeta; +import Space.VesmirneTelesa.Hviezda; +import Space.VesmirneTelesa.Kometa; +import Space.Galaxia; +import Space.VesmirneTelesa.Zem; + +import java.util.Date; + + +public class Main { + public static void main(String[] args) { + Vesmir myFirstUniverse = new Vesmir(); + myFirstUniverse.StartVesmir(); + + Hmlovina Mihi = new Hmlovina(); + Hmlovina Nana = new Hmlovina(); + + SlnecnaSustava slnecnaSustavaSystem = new SlnecnaSustava(); + slnecnaSustavaSystem.AddTeleso(new Planeta("Neptun",1024300,49532)); + slnecnaSustavaSystem.AddTeleso(new Planeta("Uran",8683000,51118)); + slnecnaSustavaSystem.AddTeleso(new Planeta("Jupiter",1898600,142984)); + slnecnaSustavaSystem.AddTeleso(new Planeta("Saturn",5684600,120536)); + slnecnaSustavaSystem.AddTeleso(new Kometa("Mihalova kometa")); + + SlnecnaSustava susedna = new SlnecnaSustava(); + susedna.AddTeleso(new Hviezda("SusednaHviezda",25652240, 5566454)); + susedna.AddTeleso(new Kometa("SusednaKometa")); + susedna.AddTeleso(new Planeta("SusednaPlaneta",1143401,51788)); + + Planeta Skye = new Planeta(); + Galaxia Mliecna_cesta = new Galaxia(); + Mliecna_cesta.addSustava(slnecnaSustavaSystem); + Mliecna_cesta.addSustava(susedna); + Mliecna_cesta.planetarneSustavy[1].AddTeleso(Skye); + + SlnecnaSustava Popo = new SlnecnaSustava(); + Galaxia Mihalov = new Galaxia(); + Mihalov.addSustava(Popo); + + Mihalov.PosliSpravu(Mliecna_cesta,"Ahoj mliecna cesta"); + + Zem MatickaZem = new Zem("Zem",5973600,12756); + for(int i = 0; i < 100; i++) + { + + MatickaZem.AddTvora(new Chonotnica()); + MatickaZem.AddTvora(new Meduza()); + } + Tvor[] PoleTvorov = MatickaZem.GetPoleTvorov(); + + for(int i = 0; i < MatickaZem.GetPocetTvorov(); i++) + { + PoleTvorov[i].Hybsa(10,10,10); + } + + + Kapor vianocnyKapor = new Kapor(50); + vianocnyKapor.born(new Date()); + MatickaZem.AddTvora(vianocnyKapor); + vianocnyKapor.Hybsa(10,10,0); + vianocnyKapor.die(new Date()); + ; + + + ZlataRybka zlateRybky = new ZlataRybka(30); + MatickaZem.AddTvora(zlateRybky); + + Orol orly = new Orol(20); + MatickaZem.AddTvora(orly); + + Mucha vinnaMuska = new Mucha(); + vinnaMuska.Vzlietnutie(); + MatickaZem.AddTvora(vinnaMuska); + + Muz prvyMuz = new Muz(null, null,34,"Adam","Pvy"); + Zena prvaZena = new Zena(null, null,34,"Eva","Pva"); + + System.out.println(prvyMuz); + System.out.println(prvaZena); + + Clovek prveDieta = prvaZena.Splodit(prvyMuz); + Date dNow= new Date(); + + prveDieta.born(dNow); + prveDieta.setMeno("Kain"); + + Clovek druheDieta = prvaZena.Splodit(prvyMuz); + + druheDieta.born(dNow); + druheDieta.setMeno("Abel"); + + MatickaZem.AddTvora(prvyMuz); + MatickaZem.AddTvora(prvaZena); + MatickaZem.AddTvora(prveDieta); + MatickaZem.AddTvora(druheDieta); + + myFirstUniverse.StopVesmir(); + + + + } +} \ No newline at end of file diff --git a/src/Space/Galaxia.java b/src/Space/Galaxia.java new file mode 100644 index 0000000..0c9b966 --- /dev/null +++ b/src/Space/Galaxia.java @@ -0,0 +1,47 @@ +package Space; + +public class Galaxia { + private Boolean galaxyState; + private String msg; + + private int pocetSustav = 0; + + public SlnecnaSustava[] planetarneSustavy = new SlnecnaSustava[4000]; + + + public void PosliSpravu(Galaxia galaxy, String sprava) + { + galaxy.PrijmiSpravu(sprava); + } + + public void PrijmiSpravu(String prijataSprava) + { + msg = prijataSprava; + System.out.println("Bola odoslana sprava " + msg + ", mozno ju zaslali mimozemstania!"); + } + + public void StartGalaxy() + { + galaxyState = true; + System.out.println("Galaxia sa narodila"); + } + + public void StopGalaxy() + { + galaxyState = false; + System.out.println("Galaxia umrela!"); + } + + + + + public void addSustava(SlnecnaSustava sustavaToAdd) + { + planetarneSustavy[pocetSustav] = sustavaToAdd; + pocetSustav++; + } + + public Galaxia() + { + } +} diff --git a/src/Space/Hmlovina.java b/src/Space/Hmlovina.java new file mode 100644 index 0000000..c6bc77a --- /dev/null +++ b/src/Space/Hmlovina.java @@ -0,0 +1,16 @@ +package Space; + +public class Hmlovina { + private long velkost; + private long dlzkaZivota; + private long x,y,z; + + public Hmlovina() + { + velkost = 0; + dlzkaZivota = 0; + x = 1000; + y = 1000; + z = 1000; + } +} diff --git a/src/Space/SlnecnaSustava.java b/src/Space/SlnecnaSustava.java new file mode 100644 index 0000000..4656f07 --- /dev/null +++ b/src/Space/SlnecnaSustava.java @@ -0,0 +1,50 @@ +package Space; + +import Space.VesmirneTelesa.Vesmirne_Teleso; +import Space.VesmirneTelesa.Hviezda; +import Space.VesmirneTelesa.Kometa; +import Space.VesmirneTelesa.Planeta; + + +public class SlnecnaSustava { + private Vesmirne_Teleso[] Obezne_Telesa = new Vesmirne_Teleso[4000]; + private int objet_counter; + + public int GetNumberOfObjects() + { + return objet_counter; + } + + private void SetObjectCounter(int object_counter) + { + this.objet_counter = object_counter; + } + + public SlnecnaSustava() { + Hviezda Slnko = new Hviezda("Sun", 200000000,5780); + SetObjectCounter(0); + + Obezne_Telesa[objet_counter] = new Planeta("Merkúr", 3303000, 4880); + objet_counter++; + + Obezne_Telesa[objet_counter] = new Planeta("Venuša", 4869000, 12104); + objet_counter++; + + Obezne_Telesa[objet_counter] = new Planeta("Zem", 5973600, 12756); + objet_counter++; + + Obezne_Telesa[objet_counter] = new Planeta("Mars", 6421800, 6794); + objet_counter++; + + Obezne_Telesa[objet_counter] = new Kometa("Halleyho kométa"); + objet_counter++; + } + + public void AddTeleso(Vesmirne_Teleso Nove_teleso) + { + Obezne_Telesa[objet_counter] = Nove_teleso; + objet_counter++; + } + + +} diff --git a/src/Space/Vesmir.java b/src/Space/Vesmir.java new file mode 100644 index 0000000..5e30e8b --- /dev/null +++ b/src/Space/Vesmir.java @@ -0,0 +1,42 @@ +package Space; + +public class Vesmir { + + private boolean state; + private long velkost; + + public Vesmir() + { + state = false; + velkost = 0; + } + + public void StartVesmir() + { + state = true; + System.out.println("Vesmir nastartovany!"); + IncreaseSize(); + } + + public void StopVesmir() + { + DecreaseSize(900000); + state = false; + System.out.println("Vesmir vypnuty !"); + } + + private void IncreaseSize() + { + while (velkost < 999000){ + velkost++; + } + System.out.println("Vesmir zvacsil svoju velkost na: " + velkost + ", mozno by si mal davat pozor na svoju vahu"); + } + + private void DecreaseSize(long pozadovanVelkost){ + while (velkost > pozadovanVelkost){ + velkost--; + } + System.out.println("Vesmir znižil svoju velkost na:" + velkost); + } +} diff --git a/src/Space/VesmirneTelesa/Hviezda.java b/src/Space/VesmirneTelesa/Hviezda.java new file mode 100644 index 0000000..d1cd8c1 --- /dev/null +++ b/src/Space/VesmirneTelesa/Hviezda.java @@ -0,0 +1,119 @@ +package Space.VesmirneTelesa; + +public class Hviezda extends Vesmirne_Teleso { + private String meno; + private double vaha; + private double teplota; + private double gravitacia; + + private Boolean svietim; + + public String GetName() + { + return meno; + } + + private void SetMeno(String meno) + { + this.meno = meno; + } + + public double GetWeight() + { + return vaha; + } + + private void SetWeight(double vaha) + { + if ((vaha - this.vaha) <= 100000 && this.vaha != 0) + { + IncreaseGravity(100); + } + if ((vaha - this.vaha) > 100000 && this.vaha != 0) + { + IncreaseGravity(200); + } + if ((this.vaha - vaha) <= 100000 && this.vaha != 0) + { + DecreaseGravity(100); + } + if ((this.vaha - vaha) > 100000 && this.vaha != 0) + { + DecreaseGravity(200); + } + this.vaha = vaha; + } + + public double GetTeplota() + { + return teplota; + } + + private void SetTeplota(double teplota) + { + if (this.teplota < teplota && this.vaha != 0) + { + System.out.println("Zvysujem teplotu"); + } + if (this.teplota > teplota && this.vaha != 0) + { + System.out.println("Znizujem teplotu."); + } + + if (this.teplota == 0) { + Zhasni(); + } + + if (this.teplota > 0){ + Sviet(); + } + + this.teplota =teplota; + } + public Hviezda(String meno, double vaha, double teplota) + { + SetMeno(meno); + SetTeplota(teplota); + SetWeight(vaha); + } + + public Hviezda() + { + meno = "hviezda"; + vaha = 2000000000; + teplota = 5000; + } + + public double GetGravity() + { + return gravitacia; + + } + + private void SetGravity(double gravitacia) + { + this.gravitacia = gravitacia; + } + + private double IncreaseGravity(double add) + { + gravitacia = gravitacia + add; + return gravitacia; + } + + private double DecreaseGravity(double dec) + { + gravitacia = gravitacia - dec; + return gravitacia; + } + + void Sviet() + { + svietim = true; + } + + void Zhasni() + { + svietim = false; + } +} diff --git a/src/Space/VesmirneTelesa/Kometa.java b/src/Space/VesmirneTelesa/Kometa.java new file mode 100644 index 0000000..983912c --- /dev/null +++ b/src/Space/VesmirneTelesa/Kometa.java @@ -0,0 +1,21 @@ +package Space.VesmirneTelesa; + +public class Kometa extends Vesmirne_Teleso { + private String meno; + + public String GetName() + { + return meno; + } + + private void SetMeno(String meno) + { + this.meno = meno; + } + + public Kometa(String meno) + { + SetMeno(meno); + } +} + diff --git a/src/Space/VesmirneTelesa/Planeta.java b/src/Space/VesmirneTelesa/Planeta.java new file mode 100644 index 0000000..4eb0663 --- /dev/null +++ b/src/Space/VesmirneTelesa/Planeta.java @@ -0,0 +1,110 @@ +package Space.VesmirneTelesa; + +public class Planeta extends Vesmirne_Teleso { + private String meno; + private double vaha; + private double priemer; + private double gravitacia = 9.81; + private boolean weightSet = false; + + public String GetMeno() + { + return meno; + } + + private void SetName(String name) + { + this.meno = name; + } + + public double GetWeight() + { + return vaha; + } + + private void SetWeight(double vaha) + { + if ((vaha - this.vaha) <= 1000 && this.vaha != 0) + { + System.out.println("Dokelu, pribrala som"); + } + if ((vaha - this.vaha) > 1000 && this.vaha != 0) + { + System.out.println("Sakra,moc som pribrala"); + IncreaseGravity(0.1); + } + if ((this.vaha - vaha) <= 1000 && this.vaha != 0) + { + System.out.println("Ja chudnem"); + } + if ((this.vaha - vaha) > 1000 && this.vaha != 0) + { + System.out.println("Ja chudnem veľmi"); + DecreaseGravity(0.1); + } + this.vaha = vaha; + } + + public double GetDiameter() { + + return priemer; + } + + private void SetDiameter(double priemer) + { + this.priemer = priemer; + } + + public Planeta(String meno, double vaha, double priemer) + { + SetName(meno); + SetDiameter(priemer); + SetWeight(vaha); + SetGravity(gravitacia); + } + + public double GetGravity() + { + System.out.println("Moja gravitacia je:" + gravitacia); + return gravitacia; + } + + private void SetGravity(double gravitacia) + { + this.gravitacia = gravitacia; + } + + private double IncreaseGravity(double add) + { + gravitacia = gravitacia + add; + return gravitacia; + } + + private double DecreaseGravity(double dec) + { + gravitacia = gravitacia - dec; + return gravitacia; + } + + public Planeta(long gravitacia) + { + this.gravitacia = gravitacia; + } + + public Planeta() + { + meno = "a"; + priemer = 1000; + vaha = 1000; + gravitacia = 9.81; + } + + public void SetPlanetaryWeight(double vaha) + { + if (this.weightSet == false) + { + SetWeight(vaha); + weightSet = true; + } + } +} diff --git a/src/Space/VesmirneTelesa/Vesmirne_Teleso.java b/src/Space/VesmirneTelesa/Vesmirne_Teleso.java new file mode 100644 index 0000000..5a105e1 --- /dev/null +++ b/src/Space/VesmirneTelesa/Vesmirne_Teleso.java @@ -0,0 +1,16 @@ +package Space.VesmirneTelesa; + +public class Vesmirne_Teleso +{ + private String zatial; + + public String getZatial() + { + return zatial; + } + + protected void setZatial(String zatial) + { + this.zatial = zatial; + } +} diff --git a/src/Space/VesmirneTelesa/Zem.java b/src/Space/VesmirneTelesa/Zem.java new file mode 100644 index 0000000..93da4a1 --- /dev/null +++ b/src/Space/VesmirneTelesa/Zem.java @@ -0,0 +1,28 @@ +package Space.VesmirneTelesa; + +import Zive_Tvory.Tvor; + +public class Zem extends Planeta { + + private Tvor[] PoleTvorov; + private int PocetTvorov; + public Zem(String meno, double vaha, double priemer) + { + super(meno, vaha, priemer); + PoleTvorov = new Tvor[10000]; + PocetTvorov = 0; + } + public void AddTvora(Tvor tentoTvor) + { + PoleTvorov[PocetTvorov] = tentoTvor; + PocetTvorov++; + } + public Tvor[] GetPoleTvorov() + { + return PoleTvorov; + } + public int GetPocetTvorov() + { + return PocetTvorov; + } +} diff --git a/src/Zive_Tvory/Bezstavovce/Bezstavovec.java b/src/Zive_Tvory/Bezstavovce/Bezstavovec.java new file mode 100644 index 0000000..46100f4 --- /dev/null +++ b/src/Zive_Tvory/Bezstavovce/Bezstavovec.java @@ -0,0 +1,25 @@ +package Zive_Tvory.Bezstavovce; + +import Zive_Tvory.Tvor; + +import java.util.Date; + +public class Bezstavovec extends Tvor { + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + + } + + @Override + public void born(Date dayOfBirth) + { + + } + + @Override + public void die(Date dayOfDeath) + { + + } +} diff --git a/src/Zive_Tvory/Bezstavovce/Chonotnica.java b/src/Zive_Tvory/Bezstavovce/Chonotnica.java new file mode 100644 index 0000000..4156ac5 --- /dev/null +++ b/src/Zive_Tvory/Bezstavovce/Chonotnica.java @@ -0,0 +1,25 @@ +package Zive_Tvory.Bezstavovce; + +import Zive_Tvory.Tvor; + +import java.util.Date; + +public class Chonotnica extends Tvor { + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + System.out.println("Som chobotnica a plavem v mori"); + } + + @Override + public void born(Date dayOfBirth) + { + + } + + @Override + public void die(Date dayOfDeath) + { + + } +} diff --git a/src/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.java b/src/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.java new file mode 100644 index 0000000..de78d59 --- /dev/null +++ b/src/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.java @@ -0,0 +1,10 @@ +package Zive_Tvory.Bezstavovce.Hmyz; + +import Zive_Tvory.Bezstavovce.Bezstavovec; + +public abstract class Hmyz extends Bezstavovec { + private void LayEggs() + { + System.out.println("Som hmyz a otravujem ludi"); + } +} diff --git a/src/Zive_Tvory/Bezstavovce/Hmyz/Mucha.java b/src/Zive_Tvory/Bezstavovce/Hmyz/Mucha.java new file mode 100644 index 0000000..894e40f --- /dev/null +++ b/src/Zive_Tvory/Bezstavovce/Hmyz/Mucha.java @@ -0,0 +1,25 @@ +package Zive_Tvory.Bezstavovce.Hmyz; + +public class Mucha extends Hmyz { + private boolean Leti; + + public Mucha() { + Leti = false; + } + + public void Vzlietnutie() + { + Leti = true; + System.out.println("Zacal som letiet"); + } + public void Pristanie() + { + Leti = false; + System.out.println("I stopped flying"); + } + + public boolean Leti() + { + return Leti; + } +} diff --git a/src/Zive_Tvory/Bezstavovce/Meduza.java b/src/Zive_Tvory/Bezstavovce/Meduza.java new file mode 100644 index 0000000..a391a65 --- /dev/null +++ b/src/Zive_Tvory/Bezstavovce/Meduza.java @@ -0,0 +1,24 @@ +package Zive_Tvory.Bezstavovce; + +import Zive_Tvory.Tvor; +import java.util.Date; + +public class Meduza extends Tvor { + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + System.out.println("Som meduza a len tak si existujem vo vode"); + } + + @Override + public void born(Date dayOfBirth) + { + + } + + @Override + public void die(Date dayOfDeath) + { + + } +} diff --git a/src/Zive_Tvory/Cicavce/Cicable.java b/src/Zive_Tvory/Cicavce/Cicable.java new file mode 100644 index 0000000..e55374b --- /dev/null +++ b/src/Zive_Tvory/Cicavce/Cicable.java @@ -0,0 +1,11 @@ +package Zive_Tvory.Cicavce; + +public interface Cicable { + public default void cicat(Cicavec Mama) + { + } + public default void cicat(MaterskeMlieko mlieko) + { + } + +} diff --git a/src/Zive_Tvory/Cicavce/Cicavec.java b/src/Zive_Tvory/Cicavce/Cicavec.java new file mode 100644 index 0000000..c19cd7f --- /dev/null +++ b/src/Zive_Tvory/Cicavce/Cicavec.java @@ -0,0 +1,30 @@ +package Zive_Tvory.Cicavce; + +import Zive_Tvory.Stavovce.Stavovec; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.*; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova.Nervova_sustava_cicavec; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Sustava; + + +public abstract class Cicavec extends Stavovec implements Cicable +{ + private int Teplota; + public Cicavec(int pocetStavcov) + { + super(pocetStavcov); + Teplota = 36; + } + + @Override + public void CreateSustavy() { + sustavaStavovca = new Sustava[8]; + sustavaStavovca[0] = new ObehovaSustava(TypSustavy.OBEHOVA); + sustavaStavovca[1] = new TravaciaSustava(TypSustavy.TRAVACIA); + sustavaStavovca[2] = new VylucovaciaSustava(TypSustavy.VYLUCOVACIA); + sustavaStavovca[3] = new PohybovaSustava(TypSustavy.POHYBOVA); + sustavaStavovca[4] = new Nervova_sustava_cicavec(TypSustavy.NERVOVA); + sustavaStavovca[5] = new RozmnozovaciaSustava(TypSustavy.ROZMNOZOVACIA); + sustavaStavovca[6] = new DychaciaSustava(TypSustavy.DYCHACIA); + sustavaStavovca[7] = new OpornaSustava(TypSustavy.OPORNA); + } +} diff --git a/src/Zive_Tvory/Cicavce/MaterskeMlieko.java b/src/Zive_Tvory/Cicavce/MaterskeMlieko.java new file mode 100644 index 0000000..18dcd4d --- /dev/null +++ b/src/Zive_Tvory/Cicavce/MaterskeMlieko.java @@ -0,0 +1,6 @@ +package Zive_Tvory.Cicavce; + +public class MaterskeMlieko +{ + +} diff --git a/src/Zive_Tvory/Clovecina/Clovek.java b/src/Zive_Tvory/Clovecina/Clovek.java new file mode 100644 index 0000000..3e53b03 --- /dev/null +++ b/src/Zive_Tvory/Clovecina/Clovek.java @@ -0,0 +1,61 @@ +package Zive_Tvory.Clovecina; + +import Zive_Tvory.Cicavce.Cicavec; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public abstract class Clovek extends Cicavec { + protected Clovek otec; + protected Clovek matka; + protected List deti; + + protected String meno; + protected String priezvisko; + public Clovek(Clovek Otec, Clovek Matka, int pocetStavcov) + { + super(pocetStavcov); + this.otec = Otec; + this.matka = Matka; + deti = new ArrayList(); + + } + + @Override + public void born(Date dayOfBirth) + { + super.born(dayOfBirth); + } + + @Override + public void die(Date dayOfDeath) + { + super.die(dayOfDeath); + } + + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + super.Hybsa(directionX, directionY, directionZ); + } + + @Override + public void cicat(Cicavec Matka) + { + super.cicat(Matka); + } + + @Override + public String toString() { + return "Clovek{" + + "meno='" + meno + '\'' + + ", priezvisko='" + priezvisko + '\'' + + '}'; + } + + public void setMeno(String meno) + { + this.meno = meno; + } + +} diff --git a/src/Zive_Tvory/Clovecina/Muz.java b/src/Zive_Tvory/Clovecina/Muz.java new file mode 100644 index 0000000..472cab4 --- /dev/null +++ b/src/Zive_Tvory/Clovecina/Muz.java @@ -0,0 +1,35 @@ +package Zive_Tvory.Clovecina; + +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.*; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova.Nervova_sustava_cicavec; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovacieSustavy.RozmnozovaciaSustavaMuz; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Sustava; + + +public class Muz extends Clovek { + public Muz(Clovek Otec, Clovek Matka, int pocetStavcov) + { + super(Otec,Matka,pocetStavcov); + } + public Muz(Clovek Otec, Clovek Matka, int pocetStavcov, String meno, String priezvisko) + { + super(Otec,Matka,pocetStavcov); + super.meno = meno; + super.priezvisko = priezvisko; + CreateSustavy(); + } + + @Override + public void CreateSustavy() { + sustavaStavovca = new Sustava[8]; + sustavaStavovca[0] = new ObehovaSustava(TypSustavy.OBEHOVA); + sustavaStavovca[1] = new TravaciaSustava(TypSustavy.TRAVACIA); + sustavaStavovca[2] = new VylucovaciaSustava(TypSustavy.VYLUCOVACIA); + sustavaStavovca[3] = new PohybovaSustava(TypSustavy.POHYBOVA); + sustavaStavovca[4] = new Nervova_sustava_cicavec(TypSustavy.NERVOVA); + sustavaStavovca[5] = new RozmnozovaciaSustavaMuz(TypSustavy.ROZMNOZOVACIA); + sustavaStavovca[6] = new DychaciaSustava(TypSustavy.DYCHACIA); + sustavaStavovca[7] = new OpornaSustava(TypSustavy.OPORNA); + java.lang.System.out.println("Som muz a mam komplexny nervovy syste a muzske rozmnozovaci system"); + } +} diff --git a/src/Zive_Tvory/Clovecina/Zena.java b/src/Zive_Tvory/Clovecina/Zena.java new file mode 100644 index 0000000..1736c72 --- /dev/null +++ b/src/Zive_Tvory/Clovecina/Zena.java @@ -0,0 +1,59 @@ +package Zive_Tvory.Clovecina; + +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.*; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova.Nervova_sustava_cicavec; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovacieSustavy.RozmnozovaciaSustavaZena; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Sustava; + +import java.util.Random; + +public class Zena extends Clovek { + public Zena(Clovek Otec, Clovek Matka, int pocetStavcov) + { + super(Otec,Matka, pocetStavcov); + } + public Zena(Clovek Otec, Clovek Matka, int pocetStavcov, String meno, String priezvisko) + { + super(Otec,Matka,pocetStavcov); + super.meno = meno; + super.priezvisko = priezvisko; + CreateSustavy(); + } + public Clovek Splodit(Muz sTymtoMuzom){ + + Random rand = new Random(); + Boolean man = rand.nextBoolean(); + Clovek cloviecikSplodeny; + if (man == true) + { + cloviecikSplodeny = new Muz(sTymtoMuzom,this,34); + }else + { + cloviecikSplodeny = new Zena(sTymtoMuzom,this,34); + } + super.deti.add(cloviecikSplodeny); + sTymtoMuzom.deti.add(cloviecikSplodeny); + cloviecikSplodeny.priezvisko = super.priezvisko + "-" + sTymtoMuzom.priezvisko; + babyInsideCare(cloviecikSplodeny); + return cloviecikSplodeny; + } + public void babyInsideCare(Clovek plod) + { + RozmnozovaciaSustavaZena myRS = new RozmnozovaciaSustavaZena(TypSustavy.ROZMNOZOVACIA); + myRS.takeAndCareForBaby(plod); + } + @Override + public void CreateSustavy() { + sustavaStavovca = new Sustava[8]; + sustavaStavovca[0] = new ObehovaSustava(TypSustavy.OBEHOVA); + sustavaStavovca[1] = new TravaciaSustava(TypSustavy.TRAVACIA); + sustavaStavovca[2] = new VylucovaciaSustava(TypSustavy.VYLUCOVACIA); + sustavaStavovca[3] = new PohybovaSustava(TypSustavy.POHYBOVA); + sustavaStavovca[4] = new Nervova_sustava_cicavec(TypSustavy.NERVOVA); + sustavaStavovca[5] = new RozmnozovaciaSustavaZena(TypSustavy.ROZMNOZOVACIA); + sustavaStavovca[6] = new DychaciaSustava(TypSustavy.DYCHACIA); + sustavaStavovca[7] = new OpornaSustava(TypSustavy.OPORNA); + java.lang.System.out.println("Som zena a mam zlozitu nervovu sustavu a speci rozmnozovaciu sustavu"); + } +} + diff --git a/src/Zive_Tvory/Stavovce.7z b/src/Zive_Tvory/Stavovce.7z new file mode 100644 index 0000000..e2903ba Binary files /dev/null and b/src/Zive_Tvory/Stavovce.7z differ diff --git a/src/Zive_Tvory/Stavovce/Ryby/Kapor.java b/src/Zive_Tvory/Stavovce/Ryby/Kapor.java new file mode 100644 index 0000000..dd6e2d0 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Ryby/Kapor.java @@ -0,0 +1,8 @@ +package Zive_Tvory.Stavovce.Ryby; + +public class Kapor extends Ryba { + public Kapor(int pocetStavcov) + { + super(pocetStavcov); + } +} diff --git a/src/Zive_Tvory/Stavovce/Ryby/Ryba.java b/src/Zive_Tvory/Stavovce/Ryby/Ryba.java new file mode 100644 index 0000000..dc412eb --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Ryby/Ryba.java @@ -0,0 +1,31 @@ +package Zive_Tvory.Stavovce.Ryby; + +import Zive_Tvory.Stavovce.Stavovec; +import java.util.Date; + +public abstract class Ryba extends Stavovec { + + public Ryba(int pocetStavcov) + { + super(pocetStavcov); + } + + @Override + public void Hybsa(int directionX, int directionY, int directionZ) { + System.out.println("Plavam, lebo som rybka"); + } + public void Bublinky() + { + System.out.println("Vypustil bublinky"); + } + + @Override + public void born(Date dayOfBirth) { + + } + + @Override + public void die(Date dayOfDeath) { + + } +} diff --git a/src/Zive_Tvory/Stavovce/Ryby/ZlataRybka.java b/src/Zive_Tvory/Stavovce/Ryby/ZlataRybka.java new file mode 100644 index 0000000..5ec9dda --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Ryby/ZlataRybka.java @@ -0,0 +1,8 @@ +package Zive_Tvory.Stavovce.Ryby; + +public class ZlataRybka extends Ryba { + public ZlataRybka(int pocetStavcov) + { + super(pocetStavcov); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.java new file mode 100644 index 0000000..17cc285 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.java @@ -0,0 +1,11 @@ +package Zive_Tvory.Stavovce.Stavovce_diely; + +public class Chrbtica { + private Stavec StavceVChrbtici[] = new Stavec[100]; + + public Chrbtica(int pocetStavcov) { + for (int i = 0; i < pocetStavcov;i++){ + StavceVChrbtici[i] = new Stavec(); + } + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.java new file mode 100644 index 0000000..d42abd0 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.java @@ -0,0 +1,4 @@ +package Zive_Tvory.Stavovce.Stavovce_diely; + +public class Stavec { +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.java new file mode 100644 index 0000000..a542fb3 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/DychaciaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class DychaciaSustava extends Sustava { + public DychaciaSustava(TypSustavy typeOfSystem) { + super(typeOfSystem); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.java new file mode 100644 index 0000000..688c815 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/CNS.java @@ -0,0 +1,11 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +public class CNS { + private Mozog CNSMozog; + private Miecha CNDMiecha; + public CNS() + { + CNSMozog = new Mozog(); + CNDMiecha = new Miecha(); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.java new file mode 100644 index 0000000..a7e6e35 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Miecha.java @@ -0,0 +1,10 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +public class Miecha { + protected Neuron[] Neuronova_siet; + + public Miecha() + { + Neuronova_siet = new Neuron[500]; + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.java new file mode 100644 index 0000000..9459b42 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Mozog.java @@ -0,0 +1,11 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + + +public class Mozog { + protected Neuron[] Neuronova_siet; + + public Mozog() + { + Neuronova_siet = new Neuron[500]; + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.java new file mode 100644 index 0000000..b2da2d9 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nerv.java @@ -0,0 +1,4 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +public class Nerv { +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.java new file mode 100644 index 0000000..9490cc8 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Nervova_sustava_cicavec.java @@ -0,0 +1,14 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova_sustava_stavovec_default; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.TypSustavy; + +public class Nervova_sustava_cicavec extends Nervova_sustava_stavovec_default { + private CNS CentralNervousSystem; + private PNS PeriferalNervousSystem; + public Nervova_sustava_cicavec(TypSustavy typeOfSystem) { + super(typeOfSystem); + CentralNervousSystem = new CNS(); + PeriferalNervousSystem = new PNS(); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.java new file mode 100644 index 0000000..3c1ecad --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/Neuron.java @@ -0,0 +1,4 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +public class Neuron { +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.java new file mode 100644 index 0000000..2f83df7 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova/PNS.java @@ -0,0 +1,9 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova; + +public class PNS { + private Nerv[] Nervs; + + public PNS(){ + Nervs = new Nerv[100]; + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.java new file mode 100644 index 0000000..ebafa11 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Nervova_sustava_stavovec_default.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class Nervova_sustava_stavovec_default extends Sustava { + public Nervova_sustava_stavovec_default(TypSustavy typeOfSystem) { + super(typeOfSystem); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.java new file mode 100644 index 0000000..a37522c --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/ObehovaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class ObehovaSustava extends Sustava { + public ObehovaSustava(TypSustavy typSustavy) { + super(typSustavy); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.java new file mode 100644 index 0000000..aa81a41 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/OpornaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class OpornaSustava extends Sustava { + public OpornaSustava(TypSustavy typeOfSystem) { + super(typeOfSystem); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.java new file mode 100644 index 0000000..dd94c33 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/PohybovaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class PohybovaSustava extends Sustava { + public PohybovaSustava(TypSustavy typeOfSystem) { + super(typeOfSystem); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.java new file mode 100644 index 0000000..029f30a --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovaciaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class RozmnozovaciaSustava extends Sustava { + public RozmnozovaciaSustava(TypSustavy typeOfSystem) { + super(typeOfSystem); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.java new file mode 100644 index 0000000..1971985 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaMuz.java @@ -0,0 +1,11 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovacieSustavy; + +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovaciaSustava; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.TypSustavy; + +public class RozmnozovaciaSustavaMuz extends RozmnozovaciaSustava { + public RozmnozovaciaSustavaMuz(TypSustavy typSustavy) + { + super(typSustavy); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.java new file mode 100644 index 0000000..8de77ed --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/RozmnozovacieSustavy/RozmnozovaciaSustavaZena.java @@ -0,0 +1,22 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovacieSustavy; + +import Zive_Tvory.Clovecina.Clovek; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.RozmnozovaciaSustava; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.TypSustavy; + +public class RozmnozovaciaSustavaZena extends RozmnozovaciaSustava { + private int BabyDevelopmentProgress = 0; + public RozmnozovaciaSustavaZena(TypSustavy typSustavy) + { + super(typSustavy); + } + public int takeAndCareForBaby(Clovek plod) + { + while (BabyDevelopmentProgress != 100) + { + BabyDevelopmentProgress++; + } + plod.CreateSustavy(); + return BabyDevelopmentProgress; + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.java new file mode 100644 index 0000000..b04bfeb --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/Sustava.java @@ -0,0 +1,13 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public abstract class Sustava { + TypSustavy typSustavy; + + public Sustava(TypSustavy typSustavy) { + this.typSustavy = typSustavy; + } + + public TypSustavy getTypSustavy() { + return typSustavy; + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.java new file mode 100644 index 0000000..70e3ed7 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TravaciaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class TravaciaSustava extends Sustava { + public TravaciaSustava(TypSustavy typSustavy) { + super(typSustavy); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.java new file mode 100644 index 0000000..e1d05e3 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/TypSustavy.java @@ -0,0 +1,12 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public enum TypSustavy { + OPORNA, + OBEHOVA, + VYLUCOVACIA, + POHYBOVA, + DYCHACIA, + TRAVACIA, + ROZMNOZOVACIA, + NERVOVA +} diff --git a/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.java b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.java new file mode 100644 index 0000000..63a236f --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovce_diely/Sustavy/VylucovaciaSustava.java @@ -0,0 +1,7 @@ +package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy; + +public class VylucovaciaSustava extends Sustava { + public VylucovaciaSustava(TypSustavy typSustavy) { + super(typSustavy); + } +} diff --git a/src/Zive_Tvory/Stavovce/Stavovec.java b/src/Zive_Tvory/Stavovce/Stavovec.java new file mode 100644 index 0000000..c9bbd5f --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Stavovec.java @@ -0,0 +1,52 @@ +package Zive_Tvory.Stavovce; + +import Zive_Tvory.Tvor; +import Zive_Tvory.Stavovce.Stavovce_diely.Chrbtica; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.*; +import Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Sustava; + +import java.util.Date; + +public class Stavovec extends Tvor{ + protected Chrbtica Chrbtica; + protected Sustava[] sustavaStavovca; + + public Stavovec(int pocetStavcov) { + Chrbtica = new Chrbtica(pocetStavcov); + + } + public void CreateSustavy(){ + sustavaStavovca = new Sustava[8]; + sustavaStavovca[0] = new ObehovaSustava(TypSustavy.OBEHOVA); + sustavaStavovca[1] = new TravaciaSustava(TypSustavy.TRAVACIA); + sustavaStavovca[2] = new VylucovaciaSustava(TypSustavy.VYLUCOVACIA); + sustavaStavovca[3] = new PohybovaSustava(TypSustavy.POHYBOVA); + sustavaStavovca[4] = new Nervova_sustava_stavovec_default(TypSustavy.NERVOVA); + sustavaStavovca[5] = new RozmnozovaciaSustava(TypSustavy.ROZMNOZOVACIA); + sustavaStavovca[6] = new DychaciaSustava(TypSustavy.DYCHACIA); + sustavaStavovca[7] = new OpornaSustava(TypSustavy.OPORNA); + } + + public Sustava[] getSystemsOfVertebrate() + { + return sustavaStavovca; + } + + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + + } + + @Override + public void born(Date dayOfBirth) + { + + } + + @Override + public void die(Date dayOfDeath) + { + + } +} diff --git a/src/Zive_Tvory/Stavovce/Vtaky/Orol.java b/src/Zive_Tvory/Stavovce/Vtaky/Orol.java new file mode 100644 index 0000000..0d86ac2 --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Vtaky/Orol.java @@ -0,0 +1,8 @@ +package Zive_Tvory.Stavovce.Vtaky; + +public class Orol extends Vtak { + public Orol(int pocetStavcov) + { + super(pocetStavcov); + } +} diff --git a/src/Zive_Tvory/Stavovce/Vtaky/Vtak.java b/src/Zive_Tvory/Stavovce/Vtaky/Vtak.java new file mode 100644 index 0000000..c4a61df --- /dev/null +++ b/src/Zive_Tvory/Stavovce/Vtaky/Vtak.java @@ -0,0 +1,36 @@ +package Zive_Tvory.Stavovce.Vtaky; + +import Zive_Tvory.Stavovce.Stavovec; + +import java.util.Date; + +public abstract class Vtak extends Stavovec { + + public Vtak(int pocetStavcov) + { + super(pocetStavcov); + } + + @Override + public void Hybsa(int directionX, int directionY, int directionZ) + { + System.out.println("Ja letim"); + } + public void Krik() + { + System.out.println("AAAAAA"); + } + + @Override + public void born(Date dayOfBirth) + { + super.dayOfBirth=dayOfBirth; + System.out.println("Narodil som sa v" + super.dayOfBirth.toString()); + + } + + @Override + public void die(Date dayOfDeath) { + + } +} diff --git a/src/Zive_Tvory/Tvor.java b/src/Zive_Tvory/Tvor.java new file mode 100644 index 0000000..c01dec4 --- /dev/null +++ b/src/Zive_Tvory/Tvor.java @@ -0,0 +1,18 @@ +package Zive_Tvory; + +import java.util.Date; +public abstract class Tvor implements bornable, dieable{ + protected Date dayOfBirth; + protected Date dayOfDeath; + public abstract void Hybsa(int directionX, int directionY, int directionZ); + + public Date getDayOfBirth() + { + return dayOfBirth; + } + + public Date getDayOfDeath() + { + return dayOfDeath; + } +} diff --git a/src/Zive_Tvory/bornable.java b/src/Zive_Tvory/bornable.java new file mode 100644 index 0000000..6e3b72a --- /dev/null +++ b/src/Zive_Tvory/bornable.java @@ -0,0 +1,8 @@ +package Zive_Tvory; + +import java.util.Date; + +public interface bornable +{ + public void born(Date dayOfBirth); +} diff --git a/src/Zive_Tvory/dieable.java b/src/Zive_Tvory/dieable.java new file mode 100644 index 0000000..33d6384 --- /dev/null +++ b/src/Zive_Tvory/dieable.java @@ -0,0 +1,8 @@ +package Zive_Tvory; + +import java.util.Date; + +public interface dieable +{ + public void die(Date dayOfDeath); +}