first push
This commit is contained in:
commit
4877e72160
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="19" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/oop3.iml" filepath="$PROJECT_DIR$/oop3.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
124
.idea/uiDesigner.xml
Normal file
124
.idea/uiDesigner.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
11
oop3.iml
Normal file
11
oop3.iml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
BIN
out/production/oop3/Main.class
Normal file
BIN
out/production/oop3/Main.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/Galaxia.class
Normal file
BIN
out/production/oop3/Space/Galaxia.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/Hmlovina.class
Normal file
BIN
out/production/oop3/Space/Hmlovina.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/SlnecnaSustava.class
Normal file
BIN
out/production/oop3/Space/SlnecnaSustava.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/Vesmir.class
Normal file
BIN
out/production/oop3/Space/Vesmir.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/VesmirneTelesa/Hviezda.class
Normal file
BIN
out/production/oop3/Space/VesmirneTelesa/Hviezda.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/VesmirneTelesa/Kometa.class
Normal file
BIN
out/production/oop3/Space/VesmirneTelesa/Kometa.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/VesmirneTelesa/Planeta.class
Normal file
BIN
out/production/oop3/Space/VesmirneTelesa/Planeta.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/VesmirneTelesa/Vesmirne_Teleso.class
Normal file
BIN
out/production/oop3/Space/VesmirneTelesa/Vesmirne_Teleso.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Space/VesmirneTelesa/Zem.class
Normal file
BIN
out/production/oop3/Space/VesmirneTelesa/Zem.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Bezstavovec.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Bezstavovec.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Chonotnica.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Chonotnica.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Mucha.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Hmyz/Mucha.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Meduza.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Bezstavovce/Meduza.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Cicavce/Cicable.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Cicavce/Cicable.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Cicavce/Cicavec.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Cicavce/Cicavec.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Cicavce/MaterskeMlieko.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Cicavce/MaterskeMlieko.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Clovecina/Clovek.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Clovecina/Clovek.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Clovecina/Muz.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Clovecina/Muz.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Clovecina/Zena.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Clovecina/Zena.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce.7z
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce.7z
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/Kapor.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/Kapor.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/Ryba.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/Ryba.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/ZlataRybka.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Ryby/ZlataRybka.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Stavovec.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Stavovec.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Orol.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Orol.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Vtak.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Stavovce/Vtaky/Vtak.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/Tvor.class
Normal file
BIN
out/production/oop3/Zive_Tvory/Tvor.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/bornable.class
Normal file
BIN
out/production/oop3/Zive_Tvory/bornable.class
Normal file
Binary file not shown.
BIN
out/production/oop3/Zive_Tvory/dieable.class
Normal file
BIN
out/production/oop3/Zive_Tvory/dieable.class
Normal file
Binary file not shown.
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
115
src/Main.java
Normal file
115
src/Main.java
Normal file
@ -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();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
47
src/Space/Galaxia.java
Normal file
47
src/Space/Galaxia.java
Normal file
@ -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()
|
||||
{
|
||||
}
|
||||
}
|
16
src/Space/Hmlovina.java
Normal file
16
src/Space/Hmlovina.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
50
src/Space/SlnecnaSustava.java
Normal file
50
src/Space/SlnecnaSustava.java
Normal file
@ -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++;
|
||||
}
|
||||
|
||||
|
||||
}
|
42
src/Space/Vesmir.java
Normal file
42
src/Space/Vesmir.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
119
src/Space/VesmirneTelesa/Hviezda.java
Normal file
119
src/Space/VesmirneTelesa/Hviezda.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
21
src/Space/VesmirneTelesa/Kometa.java
Normal file
21
src/Space/VesmirneTelesa/Kometa.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
|
110
src/Space/VesmirneTelesa/Planeta.java
Normal file
110
src/Space/VesmirneTelesa/Planeta.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
16
src/Space/VesmirneTelesa/Vesmirne_Teleso.java
Normal file
16
src/Space/VesmirneTelesa/Vesmirne_Teleso.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
28
src/Space/VesmirneTelesa/Zem.java
Normal file
28
src/Space/VesmirneTelesa/Zem.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
25
src/Zive_Tvory/Bezstavovce/Bezstavovec.java
Normal file
25
src/Zive_Tvory/Bezstavovce/Bezstavovec.java
Normal file
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
25
src/Zive_Tvory/Bezstavovce/Chonotnica.java
Normal file
25
src/Zive_Tvory/Bezstavovce/Chonotnica.java
Normal file
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
10
src/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.java
Normal file
10
src/Zive_Tvory/Bezstavovce/Hmyz/Hmyz.java
Normal file
@ -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");
|
||||
}
|
||||
}
|
25
src/Zive_Tvory/Bezstavovce/Hmyz/Mucha.java
Normal file
25
src/Zive_Tvory/Bezstavovce/Hmyz/Mucha.java
Normal file
@ -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;
|
||||
}
|
||||
}
|
24
src/Zive_Tvory/Bezstavovce/Meduza.java
Normal file
24
src/Zive_Tvory/Bezstavovce/Meduza.java
Normal file
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
src/Zive_Tvory/Cicavce/Cicable.java
Normal file
11
src/Zive_Tvory/Cicavce/Cicable.java
Normal file
@ -0,0 +1,11 @@
|
||||
package Zive_Tvory.Cicavce;
|
||||
|
||||
public interface Cicable {
|
||||
public default void cicat(Cicavec Mama)
|
||||
{
|
||||
}
|
||||
public default void cicat(MaterskeMlieko mlieko)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
30
src/Zive_Tvory/Cicavce/Cicavec.java
Normal file
30
src/Zive_Tvory/Cicavce/Cicavec.java
Normal file
@ -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);
|
||||
}
|
||||
}
|
6
src/Zive_Tvory/Cicavce/MaterskeMlieko.java
Normal file
6
src/Zive_Tvory/Cicavce/MaterskeMlieko.java
Normal file
@ -0,0 +1,6 @@
|
||||
package Zive_Tvory.Cicavce;
|
||||
|
||||
public class MaterskeMlieko
|
||||
{
|
||||
|
||||
}
|
61
src/Zive_Tvory/Clovecina/Clovek.java
Normal file
61
src/Zive_Tvory/Clovecina/Clovek.java
Normal file
@ -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<Clovek> 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;
|
||||
}
|
||||
|
||||
}
|
35
src/Zive_Tvory/Clovecina/Muz.java
Normal file
35
src/Zive_Tvory/Clovecina/Muz.java
Normal file
@ -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");
|
||||
}
|
||||
}
|
59
src/Zive_Tvory/Clovecina/Zena.java
Normal file
59
src/Zive_Tvory/Clovecina/Zena.java
Normal file
@ -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");
|
||||
}
|
||||
}
|
||||
|
BIN
src/Zive_Tvory/Stavovce.7z
Normal file
BIN
src/Zive_Tvory/Stavovce.7z
Normal file
Binary file not shown.
8
src/Zive_Tvory/Stavovce/Ryby/Kapor.java
Normal file
8
src/Zive_Tvory/Stavovce/Ryby/Kapor.java
Normal file
@ -0,0 +1,8 @@
|
||||
package Zive_Tvory.Stavovce.Ryby;
|
||||
|
||||
public class Kapor extends Ryba {
|
||||
public Kapor(int pocetStavcov)
|
||||
{
|
||||
super(pocetStavcov);
|
||||
}
|
||||
}
|
31
src/Zive_Tvory/Stavovce/Ryby/Ryba.java
Normal file
31
src/Zive_Tvory/Stavovce/Ryby/Ryba.java
Normal file
@ -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) {
|
||||
|
||||
}
|
||||
}
|
8
src/Zive_Tvory/Stavovce/Ryby/ZlataRybka.java
Normal file
8
src/Zive_Tvory/Stavovce/Ryby/ZlataRybka.java
Normal file
@ -0,0 +1,8 @@
|
||||
package Zive_Tvory.Stavovce.Ryby;
|
||||
|
||||
public class ZlataRybka extends Ryba {
|
||||
public ZlataRybka(int pocetStavcov)
|
||||
{
|
||||
super(pocetStavcov);
|
||||
}
|
||||
}
|
11
src/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.java
Normal file
11
src/Zive_Tvory/Stavovce/Stavovce_diely/Chrbtica.java
Normal file
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
4
src/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.java
Normal file
4
src/Zive_Tvory/Stavovce/Stavovce_diely/Stavec.java
Normal file
@ -0,0 +1,4 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely;
|
||||
|
||||
public class Stavec {
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy;
|
||||
|
||||
public class DychaciaSustava extends Sustava {
|
||||
public DychaciaSustava(TypSustavy typeOfSystem) {
|
||||
super(typeOfSystem);
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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];
|
||||
}
|
||||
}
|
@ -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];
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova;
|
||||
|
||||
public class Nerv {
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova;
|
||||
|
||||
public class Neuron {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy.Nervova;
|
||||
|
||||
public class PNS {
|
||||
private Nerv[] Nervs;
|
||||
|
||||
public PNS(){
|
||||
Nervs = new Nerv[100];
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy;
|
||||
|
||||
public class ObehovaSustava extends Sustava {
|
||||
public ObehovaSustava(TypSustavy typSustavy) {
|
||||
super(typSustavy);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy;
|
||||
|
||||
public class OpornaSustava extends Sustava {
|
||||
public OpornaSustava(TypSustavy typeOfSystem) {
|
||||
super(typeOfSystem);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy;
|
||||
|
||||
public class PohybovaSustava extends Sustava {
|
||||
public PohybovaSustava(TypSustavy typeOfSystem) {
|
||||
super(typeOfSystem);
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package Zive_Tvory.Stavovce.Stavovce_diely.Sustavy;
|
||||
|
||||
public class RozmnozovaciaSustava extends Sustava {
|
||||
public RozmnozovaciaSustava(TypSustavy typeOfSystem) {
|
||||
super(typeOfSystem);
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user