diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..e4cd0d7
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index fc10d56..77d0d57 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,6 +2,7 @@
+
diff --git a/AufgabenBlatt10/.gitignore b/AufgabenBlatt10/.gitignore
new file mode 100644
index 0000000..f68d109
--- /dev/null
+++ b/AufgabenBlatt10/.gitignore
@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/AufgabenBlatt10/AufgabenBlatt10.iml b/AufgabenBlatt10/AufgabenBlatt10.iml
new file mode 100644
index 0000000..1dc35ea
--- /dev/null
+++ b/AufgabenBlatt10/AufgabenBlatt10.iml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/AufgabenBlatt10/src/aufgabe4/Hund.java b/AufgabenBlatt10/src/aufgabe4/Hund.java
new file mode 100644
index 0000000..36e11f8
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe4/Hund.java
@@ -0,0 +1,54 @@
+package aufgabe4;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * Generic test class defining an abstract dog
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Hund {
+
+ /**
+ * name of the dog
+ */
+ protected String name;
+
+ @Generated({})
+ public Hund(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Prints the barking noises this dog makes to System.out.
+ */
+ public void bellen() {
+ System.out.println("not so abstract dog barking: wau wau wuff wuff wauf");
+ }
+
+ @Generated({})
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return a short description marking this instance as abstract and the name
+ */
+ @Override
+ public String toString() {
+ return "I am an cosmically abstract transmon dog existing only in the quantum realm of the heap and my name is " + name;
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe4/Main.java b/AufgabenBlatt10/src/aufgabe4/Main.java
new file mode 100644
index 0000000..49d555c
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe4/Main.java
@@ -0,0 +1,31 @@
+package aufgabe4;
+
+/**
+ * Generic test class for testing the dogs ;)
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+public class Main {
+
+ public static void main(String[] args) {
+ Hund rocky = new Hund("Rocky");
+ Hund sissi = new Schosshund("Sissi");
+ Hund hektor = new Wachhund("Hektor");
+
+ rocky.bellen();
+ sissi.bellen();
+ hektor.bellen();
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe4/Schosshund.java b/AufgabenBlatt10/src/aufgabe4/Schosshund.java
new file mode 100644
index 0000000..8eba709
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe4/Schosshund.java
@@ -0,0 +1,47 @@
+package aufgabe4;
+
+import javax.annotation.processing.Generated;
+import java.lang.annotation.Inherited;
+
+/**
+ * Generic test class implementing a cute doggo based on an abstract dog
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Schosshund extends Hund {
+
+ @Generated({})
+ public Schosshund(String name) {
+ super(name);
+ }
+
+ /**
+ * Prints the barking noises this dog makes to System.out as:
+ * wau wau wau wau
+ */
+ @Override
+ public void bellen() {
+ System.out.println("wau wau wau wau");
+ }
+
+ /**
+ * @return the race of the dog ("Schosshund") and the name as string
+ */
+ @Override
+ public String toString() {
+ return "I am a Schosshund and my name is " + name;
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe4/Wachhund.java b/AufgabenBlatt10/src/aufgabe4/Wachhund.java
new file mode 100644
index 0000000..5d311ad
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe4/Wachhund.java
@@ -0,0 +1,46 @@
+package aufgabe4;
+
+import javax.annotation.processing.Generated;
+
+/**
+ * Generic test class implementing a watchdog based on an abstract dog
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Wachhund extends Hund {
+
+ @Generated({})
+ public Wachhund(String name) {
+ super(name);
+ }
+
+ /**
+ * Prints the barking noises this dog makes to System.out as:
+ * WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF
+ */
+ @Override
+ public void bellen() {
+ System.out.println("WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF WUFF");
+ }
+
+ /**
+ * @return the race of the dog ("Wachhund") and the name as string
+ */
+ @Override
+ public String toString() {
+ return "I am a Wachhund and my name is " + name;
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe5/Elephant.java b/AufgabenBlatt10/src/aufgabe5/Elephant.java
new file mode 100644
index 0000000..a3abdfd
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe5/Elephant.java
@@ -0,0 +1,40 @@
+package aufgabe5;
+
+/**
+ * Generic test class defining an elephant
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+public class Elephant extends Tier {
+
+ public Elephant() {
+ super(4, "elephanten grau");
+ }
+
+ /**
+ * Trumpet for a certain amount of duration through which sth. is printed to System.out.
+ * The precision of timing is up to milliseconds.
+ * @param dauer duration to trumpet in seconds
+ */
+ public void trompeten(double dauer) {
+ var start = System.currentTimeMillis();
+ // convert dauer from seconds to milliseconds
+ var duration = (int) (dauer * 1e3);
+
+ while(System.currentTimeMillis() - start < duration) {
+ System.out.println("törööööööööööööö");
+ }
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe5/Gehege.java b/AufgabenBlatt10/src/aufgabe5/Gehege.java
new file mode 100644
index 0000000..e328159
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe5/Gehege.java
@@ -0,0 +1,62 @@
+package aufgabe5;
+
+/**
+ * Generic test class defining a cage for animals
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Gehege {
+ /**
+ * How many animals fit in the cage
+ */
+ private int kapazitaet;
+ /**
+ * Size of the cage in square meters
+ */
+ private final double groesse;
+
+ public Gehege(int kapazitaet, double groesse) {
+ this.kapazitaet = kapazitaet;
+ this.groesse = groesse;
+ }
+
+ /**
+ * Add a new animal to the cage.
+ * @post increments capacity
+ * @param animal the animal to add
+ */
+ public void addTier(Tier animal) {
+ System.out.println("added animal " + animal);
+ }
+
+ /**
+ * Remove an animal to the cage.
+ * @post decrements capacity
+ * @param animal the animal to remove
+ */
+ public void removeTier(Tier animal) {
+ System.out.println("removed animal " + animal);
+ }
+
+ /**
+ * Feeds the animals of this cage.
+ * Does effectively nothing.
+ */
+ public void tiereFuettern() {
+ // feed the animals in some way cuz we don't know the exact animals in the cage
+ System.out.println("feeded animals");
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe5/Tausendfuessler.java b/AufgabenBlatt10/src/aufgabe5/Tausendfuessler.java
new file mode 100644
index 0000000..c789865
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe5/Tausendfuessler.java
@@ -0,0 +1,41 @@
+package aufgabe5;
+
+/**
+ * Generic test class defining a centipede
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+public class Tausendfuessler extends Tier {
+
+ public Tausendfuessler(String farbe) {
+ super(1000, farbe);
+ }
+
+ /**
+ * Does effectively nothing.
+ */
+ public void beineEntheddern() {
+ // do sth.
+ System.out.println("Beinchen entheddert");
+ }
+
+ /**
+ * Does effectively nothing.
+ */
+ public void beineVerheddern() {
+ // do sth.
+ System.out.println("Beinchen verheddert");
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe5/TestAnimals.java b/AufgabenBlatt10/src/aufgabe5/TestAnimals.java
new file mode 100644
index 0000000..1b3dae5
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe5/TestAnimals.java
@@ -0,0 +1,45 @@
+package aufgabe5;
+
+import org.junit.Test;
+
+/**
+ * Generic test class for testing animals
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+public class TestAnimals {
+ @Test
+ public void test() {
+ var tier = new Tier(99, "blut rot");
+ var tausendsasser = new Tausendfuessler("tausend füssler schwarz");
+ var elefranz = new Elephant();
+
+ var schlachtHof = new Gehege(5, 0.5);
+
+ schlachtHof.addTier(tier);
+ schlachtHof.addTier(tausendsasser);
+ schlachtHof.addTier(elefranz);
+
+ schlachtHof.removeTier(tausendsasser);
+
+ tausendsasser.beineEntheddern();
+ tausendsasser.beineVerheddern();
+
+ elefranz.trompeten(4.0);
+
+ tier.fressen();
+ tier.laufen(4300_000);
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe5/Tier.java b/AufgabenBlatt10/src/aufgabe5/Tier.java
new file mode 100644
index 0000000..eb24293
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe5/Tier.java
@@ -0,0 +1,48 @@
+package aufgabe5;
+
+/**
+ * Generic test class defining an animal
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Tier {
+ private final int anzahlBeine;
+ private final String farbe;
+
+ public Tier(int anzahlBeine, String farbe) {
+ this.anzahlBeine = anzahlBeine;
+ this.farbe = farbe;
+ }
+
+ /**
+ * Walk a certain distance.
+ * Does effectively nothing.
+ * @param strecke the distance to walk
+ */
+ public void laufen(double strecke) {
+ // walk the distance
+ System.out.println(strecke + "m gelaufen");
+ }
+
+ /**
+ * Eat sth.
+ * Does effectively nothing.
+ */
+ public void fressen() {
+ // eat sth.
+ System.out.println("yum yum yum yum yum yum yum yum");
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe6/AirplaneTest.java b/AufgabenBlatt10/src/aufgabe6/AirplaneTest.java
new file mode 100644
index 0000000..e5303a3
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe6/AirplaneTest.java
@@ -0,0 +1,37 @@
+package aufgabe6;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Generic test class for testing airplanes
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+public class AirplaneTest {
+
+ @Test
+ public void test() {
+ var plane1 = new Verkehrsflugzeug("boeing", 870, "q0tb47q6t3478t6q78", 220);
+ var plane2 = plane1;
+
+ var plane3 = new Doppeldecker("airbus", 170, "ß0q784tß089q34t", false);
+
+ assertEquals(plane1, plane2);
+
+ System.out.println("Can loop? " + plane3.getLooping());
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe6/Doppeldecker.java b/AufgabenBlatt10/src/aufgabe6/Doppeldecker.java
new file mode 100644
index 0000000..e951d61
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe6/Doppeldecker.java
@@ -0,0 +1,66 @@
+package aufgabe6;
+
+/**
+ * Generic test class defining a double winged airplane
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public final class Doppeldecker extends Flugzeug {
+
+ /**
+ * Minimum speed to fly a looping in km/s
+ */
+ public static final double LOOPING_SPEED = 320;
+
+ private final boolean offenesCockpit;
+
+ public Doppeldecker(String hersteller, int maxSpeed, String immatrikulationNumber, boolean offenesCockpit) {
+ super(hersteller, maxSpeed, 2);
+ setImmatNummer(immatrikulationNumber);
+ this.offenesCockpit = offenesCockpit;
+ }
+
+ public Doppeldecker(String hersteller, int maxSpeed, String immatrikulationNumber) {
+ super(hersteller, maxSpeed, 2);
+ setImmatNummer(immatrikulationNumber);
+ this.offenesCockpit = true;
+ }
+
+ /**
+ * whether the plane as an open cockpit
+ * @return whether the plane as an open cockpit
+ */
+ public boolean isOffenesCockpit() {
+ return offenesCockpit;
+ }
+
+ /**
+ * @return if this plane can fly a looping
+ */
+ @Override
+ public boolean getLooping() {
+ return getMaxSpeed() > LOOPING_SPEED;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Doppeldecker plane) {
+ return super.equals(obj) && plane.offenesCockpit == this.offenesCockpit;
+ }
+
+ return false;
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe6/Flugzeug.java b/AufgabenBlatt10/src/aufgabe6/Flugzeug.java
new file mode 100644
index 0000000..3ecea49
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe6/Flugzeug.java
@@ -0,0 +1,32 @@
+package aufgabe6;
+
+abstract class Flugzeug {
+ private String hersteller;// Herstellername
+ private int maxSpeed; // Max. Geschwindigkeit
+ private String immatNummer; // Immatrikulationsnummer
+ private int anzahlFluegel = 1; // Anzahl Flügelpaare
+ public Flugzeug(String hersteller, int maxSpeed, int anzahlFluegel) {
+ this.hersteller = hersteller;
+ this.maxSpeed = maxSpeed;
+ this.anzahlFluegel = anzahlFluegel;
+ }
+ public String getImmatNummer() {
+ return immatNummer;
+ }
+ protected void setImmatNummer(String immatNummer) {
+ this.immatNummer = immatNummer;
+ }
+ public int getMaxSpeed() {
+ return maxSpeed;
+ }
+ abstract public boolean getLooping();
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Verkehrsflugzeug plane) {
+ return this.immatNummer.equals(plane.getImmatNummer()) && this.maxSpeed == plane.getMaxSpeed();
+ }
+
+ return false;
+ }
+}
diff --git a/AufgabenBlatt10/src/aufgabe6/Verkehrsflugzeug.java b/AufgabenBlatt10/src/aufgabe6/Verkehrsflugzeug.java
new file mode 100644
index 0000000..9d1a0b3
--- /dev/null
+++ b/AufgabenBlatt10/src/aufgabe6/Verkehrsflugzeug.java
@@ -0,0 +1,63 @@
+package aufgabe6;
+
+/**
+ * Generic test class defining a passenger airplane
+ * _ _ _ _
+ * __ ___ __(_) |_| |_ ___ _ __ | |__ _ _
+ * \ \ /\ / / '__| | __| __/ _ \ '_ \ | '_ \| | | |
+ * \ V V /| | | | |_| || __/ | | | | |_) | |_| |
+ * \_/\_/ |_| |_|\__|\__\___|_| |_| |_.__/ \__, |
+ * |___/
+ * ____ __ __ _
+ * / ___|_ _____ _ __ \ \ / /__ __ _ ___| |
+ * \___ \ \ / / _ \ '_ \ \ \ / / _ \ / _` |/ _ \ |
+ * ___) \ V / __/ | | | \ V / (_) | (_| | __/ |
+ * |____/ \_/ \___|_| |_| \_/ \___/ \__, |\___|_|
+ * |___/
+ * Licensed under the GPLv2 License, Version 2.0 (the "License");
+ * Copyright (c) Sven Vogel
+ */
+@SuppressWarnings("unused")
+public class Verkehrsflugzeug extends Flugzeug {
+
+ private int passangers;
+
+ public Verkehrsflugzeug(String hersteller, int maxSpeed, String immatrikulationNumber, int passangers) {
+ super(hersteller, maxSpeed, 1);
+ this.passangers = passangers;
+ this.setImmatNummer(immatrikulationNumber);
+ }
+
+ /**
+ * @return the number of passengers
+ */
+ public int getAnzahlPassagiere() {
+ return passangers;
+ }
+
+ /**
+ * Set the number of passengers
+ * @post alters the amount of passengers
+ * @param passengers the new amount of passengers
+ */
+ public void setPassangers(int passengers) {
+ this.passangers = passengers;
+ }
+
+ /**
+ * @return if this plane can fly a looping
+ */
+ @Override
+ public final boolean getLooping() {
+ return false;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof Verkehrsflugzeug plane) {
+ return super.equals(obj) && plane.getAnzahlPassagiere() == this.passangers;
+ }
+
+ return false;
+ }
+}