diff --git a/Code/Steiner/Zootest/.vscode/settings.json b/Code/Steiner/Zootest/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/Zootest/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/Zootest/README.md b/Code/Steiner/Zootest/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/Zootest/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/Zootest/bin/Animal.class b/Code/Steiner/Zootest/bin/Animal.class deleted file mode 100644 index 13fa31a..0000000 Binary files a/Code/Steiner/Zootest/bin/Animal.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Camel.class b/Code/Steiner/Zootest/bin/Camel.class deleted file mode 100644 index 53af884..0000000 Binary files a/Code/Steiner/Zootest/bin/Camel.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Climbing.class b/Code/Steiner/Zootest/bin/Climbing.class deleted file mode 100644 index 6c59e2b..0000000 Binary files a/Code/Steiner/Zootest/bin/Climbing.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Eagle.class b/Code/Steiner/Zootest/bin/Eagle.class deleted file mode 100644 index 863ef92..0000000 Binary files a/Code/Steiner/Zootest/bin/Eagle.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Flying.class b/Code/Steiner/Zootest/bin/Flying.class deleted file mode 100644 index 67f3837..0000000 Binary files a/Code/Steiner/Zootest/bin/Flying.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Frog.class b/Code/Steiner/Zootest/bin/Frog.class deleted file mode 100644 index d06e13b..0000000 Binary files a/Code/Steiner/Zootest/bin/Frog.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/Swimming.class b/Code/Steiner/Zootest/bin/Swimming.class deleted file mode 100644 index 19ec7c2..0000000 Binary files a/Code/Steiner/Zootest/bin/Swimming.class and /dev/null differ diff --git a/Code/Steiner/Zootest/bin/ZooTest.class b/Code/Steiner/Zootest/bin/ZooTest.class deleted file mode 100644 index a3dead6..0000000 Binary files a/Code/Steiner/Zootest/bin/ZooTest.class and /dev/null differ diff --git a/Code/Steiner/Zootest/src/Animal.java b/Code/Steiner/Zootest/src/Animal.java deleted file mode 100644 index 186a13f..0000000 --- a/Code/Steiner/Zootest/src/Animal.java +++ /dev/null @@ -1,3 +0,0 @@ -public abstract class Animal { - public abstract void makeSound(); -} diff --git a/Code/Steiner/Zootest/src/Camel.java b/Code/Steiner/Zootest/src/Camel.java deleted file mode 100644 index 3aab531..0000000 --- a/Code/Steiner/Zootest/src/Camel.java +++ /dev/null @@ -1,11 +0,0 @@ -public class Camel extends Animal implements Climbing { - @Override - public void makeSound() { - System.out.println("Desert Camel grumbles!"); - } - - @Override - public void climb() { - System.out.println("Desert Camel climbs a dune."); - } -} diff --git a/Code/Steiner/Zootest/src/Climbing.java b/Code/Steiner/Zootest/src/Climbing.java deleted file mode 100644 index dda71ed..0000000 --- a/Code/Steiner/Zootest/src/Climbing.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface Climbing { - void climb(); -} diff --git a/Code/Steiner/Zootest/src/Eagle.java b/Code/Steiner/Zootest/src/Eagle.java deleted file mode 100644 index 3bb72c6..0000000 --- a/Code/Steiner/Zootest/src/Eagle.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Eagle extends Animal implements Flying, Swimming { - @Override - public void makeSound() { - System.out.println("Eagle screams!"); - } - - @Override - public void fly() { - System.out.println("Eagle flies high in the sky."); - } - - @Override - public void swim() { - System.out.println("Eagle fishes in the water (swims...)."); - } -} diff --git a/Code/Steiner/Zootest/src/Flying.java b/Code/Steiner/Zootest/src/Flying.java deleted file mode 100644 index 6207c18..0000000 --- a/Code/Steiner/Zootest/src/Flying.java +++ /dev/null @@ -1,4 +0,0 @@ -public interface Flying { - void fly(); -} - diff --git a/Code/Steiner/Zootest/src/Frog.java b/Code/Steiner/Zootest/src/Frog.java deleted file mode 100644 index c0768cc..0000000 --- a/Code/Steiner/Zootest/src/Frog.java +++ /dev/null @@ -1,16 +0,0 @@ -public class Frog extends Animal implements Swimming, Climbing { - @Override - public void makeSound() { - System.out.println("Green Frog croaks!"); - } - - @Override - public void swim() { - System.out.println("Green Frog swims in the pond."); - } - - @Override - public void climb() { - System.out.println("Green Frog climbs a tree."); - } -} diff --git a/Code/Steiner/Zootest/src/Swimming.java b/Code/Steiner/Zootest/src/Swimming.java deleted file mode 100644 index 8df57a6..0000000 --- a/Code/Steiner/Zootest/src/Swimming.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface Swimming { - void swim(); -} diff --git a/Code/Steiner/Zootest/src/ZooTest.java b/Code/Steiner/Zootest/src/ZooTest.java deleted file mode 100644 index f0d3c01..0000000 --- a/Code/Steiner/Zootest/src/ZooTest.java +++ /dev/null @@ -1,17 +0,0 @@ -public class ZooTest { - public static void main(String[] args) { - Animal eagle = new Eagle(); - eagle.makeSound(); - ((Eagle) eagle).fly(); - ((Eagle) eagle).swim(); - - Animal frog = new Frog(); - frog.makeSound(); - ((Frog) frog).swim(); - ((Frog) frog).climb(); - - Animal camel = new Camel(); - camel.makeSound(); - ((Camel) camel).climb(); - } -} diff --git a/Code/Steiner/finallyTryCatchAndFinally/.vscode/settings.json b/Code/Steiner/finallyTryCatchAndFinally/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/finallyTryCatchAndFinally/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/finallyTryCatchAndFinally/README.md b/Code/Steiner/finallyTryCatchAndFinally/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/finallyTryCatchAndFinally/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/finallyTryCatchAndFinally/bin/App.class b/Code/Steiner/finallyTryCatchAndFinally/bin/App.class deleted file mode 100644 index 4722d62..0000000 Binary files a/Code/Steiner/finallyTryCatchAndFinally/bin/App.class and /dev/null differ diff --git a/Code/Steiner/finallyTryCatchAndFinally/src/App.java b/Code/Steiner/finallyTryCatchAndFinally/src/App.java deleted file mode 100644 index 105870c..0000000 --- a/Code/Steiner/finallyTryCatchAndFinally/src/App.java +++ /dev/null @@ -1,32 +0,0 @@ -public class App { - public static void main(String[] args) throws Exception { - String text = null; - int zahler = 24; - int nenner = 0; - - try { - System.out.println(text.length()); - System.out.println(zahler / nenner); - } catch (ArithmeticException e1) { - System.out.println("fehler: " + e1.getMessage()); - } catch (Exception e) { - System.out.println("fehler: " + e.getMessage()); - } finally { - System.out.println("ABORT"); - Thread.sleep(1000); - clear(); - } - } - - public static void clear() { - try { - if (System.getProperty("os.name").contains("Windows")) { - new ProcessBuilder("cmd", "/c", "cls").inheritIO().start().waitFor(); - } else { - new ProcessBuilder("clear").inheritIO().start().waitFor(); - } - } catch (Exception e) { - e.getMessage(); - } - } -} diff --git a/Code/Steiner/fractionsSteinerTask/.vscode/settings.json b/Code/Steiner/fractionsSteinerTask/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/fractionsSteinerTask/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/fractionsSteinerTask/README.md b/Code/Steiner/fractionsSteinerTask/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/fractionsSteinerTask/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/fractionsSteinerTask/bin/Anteil.class b/Code/Steiner/fractionsSteinerTask/bin/Anteil.class deleted file mode 100644 index 727851e..0000000 Binary files a/Code/Steiner/fractionsSteinerTask/bin/Anteil.class and /dev/null differ diff --git a/Code/Steiner/fractionsSteinerTask/bin/AnteilTest.class b/Code/Steiner/fractionsSteinerTask/bin/AnteilTest.class deleted file mode 100644 index 2e582a2..0000000 Binary files a/Code/Steiner/fractionsSteinerTask/bin/AnteilTest.class and /dev/null differ diff --git a/Code/Steiner/fractionsSteinerTask/bin/Bruch.class b/Code/Steiner/fractionsSteinerTask/bin/Bruch.class deleted file mode 100644 index 315d4a6..0000000 Binary files a/Code/Steiner/fractionsSteinerTask/bin/Bruch.class and /dev/null differ diff --git a/Code/Steiner/fractionsSteinerTask/bin/BruchTest.class b/Code/Steiner/fractionsSteinerTask/bin/BruchTest.class deleted file mode 100644 index bba1747..0000000 Binary files a/Code/Steiner/fractionsSteinerTask/bin/BruchTest.class and /dev/null differ diff --git a/Code/Steiner/fractionsSteinerTask/src/Anteil.java b/Code/Steiner/fractionsSteinerTask/src/Anteil.java deleted file mode 100644 index e92dd14..0000000 --- a/Code/Steiner/fractionsSteinerTask/src/Anteil.java +++ /dev/null @@ -1,34 +0,0 @@ -public class Anteil extends Bruch { - - private static Bruch verteilt = new Bruch(0, 1); - - // Standardkonstruktor: Anteil = 0 - public Anteil() { - super(0, 1); - } - - // Konstruktor mit Zähler und Nenner - public Anteil(int z, int n) { - super(z, n); - Bruch neuerAnteil = new Bruch(z, n); - verteilt = verteilt.addiere(neuerAnteil); - - if (verteilt.dezimalwert() > 1) { - System.out.println("Fehler: Der Gesamtwert der verteilten Anteile übersteigt 1."); - verteilt = verteilt.subtrahiere(neuerAnteil); // Rollback des Fehlers - setZaehler(0); // Setzt Anteil zurück - setNenner(1); - } - } - - // Methode, um den verteilten Anteil als double zu erhalten - public static double getVerteilt() { - return verteilt.dezimalwert(); - } - - // Methode, um den verbleibenden Anteil als Bruch zu erhalten - public static Bruch getRest() { - Bruch eins = new Bruch(1, 1); - return eins.subtrahiere(verteilt); - } -} diff --git a/Code/Steiner/fractionsSteinerTask/src/AnteilTest.java b/Code/Steiner/fractionsSteinerTask/src/AnteilTest.java deleted file mode 100644 index 456c9e2..0000000 --- a/Code/Steiner/fractionsSteinerTask/src/AnteilTest.java +++ /dev/null @@ -1,57 +0,0 @@ -public class AnteilTest { - public static void main(String[] args) { - - // Bruch-Test - - System.out.println("*** Aufgabe Bruch ergänzen"); - - Bruch bruch1 = new Bruch(1, 2); - - Bruch bruch2 = new Bruch(3, 4); - - Bruch bruch3 = bruch1.addiere(bruch2); - - bruch3.gekuerztausgeben(); - - System.out.println(""); - - System.out.println(bruch3.dezimalwert()); - - Bruch bruch4 = bruch1.subtrahiere(bruch2); - - bruch4.gekuerztausgeben(); - - System.out.println(""); - - System.out.println(bruch4.dezimalwert()); - - // Anteil-Test - - System.out.println(""); - - System.out.println("*** Aufgabe Anteil"); - - int vermoegen = 200000; - - Anteil anteil1 = new Anteil(1, 4); - - Anteil anteil2 = new Anteil(1, 2); - - System.out.println("Anteil anteil1: " + anteil1.bruchToString()); - - System.out.println("Betrag von anteil1: " + vermoegen * anteil1.dezimalwert()); - - System.out.println("Anteil anteil2: " + anteil2.bruchToString()); - - System.out.println("Betrag von anteil2: " + vermoegen * anteil2.dezimalwert()); - - System.out.println(""); - - // System.out.println("Verteilt: " + Anteil.verteilt.bruchToString()); - - System.out.println("Rest: " + anteil1.getRest().bruchToString()); - - System.out.println("Restbetrag: " + vermoegen * anteil1.getRest().dezimalwert()); - - } -} diff --git a/Code/Steiner/fractionsSteinerTask/src/Bruch.java b/Code/Steiner/fractionsSteinerTask/src/Bruch.java deleted file mode 100644 index 5900b87..0000000 --- a/Code/Steiner/fractionsSteinerTask/src/Bruch.java +++ /dev/null @@ -1,101 +0,0 @@ -public class Bruch { - - private int zaehler; - private int nenner; - - Bruch() { - zaehler = 0; - nenner = 1; - } - - Bruch(int x) { - zaehler = x; - nenner = 1; - } - - Bruch(int x, int y) { - zaehler = x; - nenner = y; - } - - void setZaehler(int z) { - zaehler = z; - } - - void setNenner(int n) { - nenner = n; - } - - int getZaehler() { - return zaehler; - } - - int getNenner() { - return nenner; - } - - String bruchToString() { - return zaehler + "/" + nenner; - } - - void ausgeben() { - System.out.println(zaehler + "/" + nenner); - } - - void kuerzen() { - int m, n, r; - m = Math.abs(zaehler); - n = Math.abs(nenner); - r = m % n; - while (r > 0) { - m = n; - n = r; - r = m % n; - } - zaehler /= n; - nenner /= n; - } - - void gekuerztausgeben() { - kuerzen(); - ausgeben(); - } - - Bruch multipliziere(Bruch m) { - var z = zaehler * m.zaehler; - var n = nenner * m.nenner; - return new Bruch(z, n); - } - - boolean equals(Bruch x) { - var a = new Bruch(this.zaehler, this.nenner); - var b = new Bruch(x.zaehler, x.nenner); - a.kuerzen(); - b.kuerzen(); - return (a.zaehler == b.zaehler) && (a.nenner == b.nenner); - } - - // Neue Methode: Addition - Bruch addiere(Bruch b) { - int neuerZaehler = this.zaehler * b.nenner + b.zaehler * this.nenner; - int neuerNenner = this.nenner * b.nenner; - return new Bruch(neuerZaehler, neuerNenner); - } - - // Neue Methode: Subtraktion - Bruch subtrahiere(Bruch b) { - int neuerZaehler = this.zaehler * b.nenner - b.zaehler * this.nenner; - int neuerNenner = this.nenner * b.nenner; - return new Bruch(neuerZaehler, neuerNenner); - } - - // Neue Methode: Dezimalwert - double dezimalwert() { - if (nenner == 0) { - System.out.println("Error Divided by 0"); - return 0; - } else { - return (double) zaehler / nenner; - } - } -} diff --git a/Code/Steiner/fractionsSteinerTask/src/BruchTest.java b/Code/Steiner/fractionsSteinerTask/src/BruchTest.java deleted file mode 100644 index 9f3fb6c..0000000 --- a/Code/Steiner/fractionsSteinerTask/src/BruchTest.java +++ /dev/null @@ -1,78 +0,0 @@ -import java.util.ArrayList; - -public class BruchTest { - public static void main(String[] args) { - ArrayList brueche = new ArrayList<>(); - - // Test 1: Standardkonstruktor - brueche.add(new Bruch()); - System.out.println("Test 1: " + brueche.get(0).bruchToString()); // Erwartet: 0/1 - - // Test 2: Konstruktor mit einem Parameter - brueche.add(new Bruch(3)); - System.out.println("Test 2: " + brueche.get(1).bruchToString()); // Erwartet: 3/1 - - // Test 3: Konstruktor mit zwei Parametern (positive Werte) - brueche.add(new Bruch(4, 8)); - System.out.println("Test 3: " + brueche.get(2).bruchToString()); // Erwartet: 4/8 - brueche.get(2).gekuerztausgeben(); // Erwartet: 1/2 - - // Test 4: Konstruktor mit zwei Parametern (negative Werte) - brueche.add(new Bruch(-4, 8)); - System.out.println("Test 4: " + brueche.get(3).bruchToString()); // Erwartet: -4/8 - brueche.get(3).gekuerztausgeben(); // Erwartet: -1/2 - - // Test 5: Setzen von Zähler und Nenner (normal) - brueche.get(2).setZaehler(6); - brueche.get(2).setNenner(9); - System.out.println("Test 5: " + brueche.get(2).bruchToString()); // Erwartet: 6/9 - brueche.get(2).gekuerztausgeben(); // Erwartet: 2/3 - - // Test 6: Setzen von Zähler und Nenner (mit Null) - brueche.get(2).setZaehler(0); - brueche.get(2).setNenner(9); - System.out.println("Test 6: " + brueche.get(2).bruchToString()); // Erwartet: 0/9 - - // Test 7: Setzen von Zähler und Nenner (Division durch Null) - brueche.get(2).setNenner(0); - System.out.println("Test 7: " + brueche.get(2).bruchToString()); - - // Test 8: Multiplikation - Bruch bruch4 = new Bruch(2, 3); - Bruch produkt = brueche.get(2).multipliziere(bruch4); - System.out.println("Test 8: " + produkt.bruchToString()); // Erwartet: 0/1 - - // Test 9: Gleichheit - Bruch bruch5 = new Bruch(2, 3); - Bruch bruch6 = new Bruch(4, 6); - System.out.println("Test 9: " + bruch5.equals(bruch6)); // Erwartet: true - - // Test 10: Ungleichheit - Bruch bruch7 = new Bruch(1, 2); - System.out.println("Test 10: " + bruch5.equals(bruch7)); // Erwartet: false - - // Test 11: Addition (positive und negative Werte) - Bruch bruch8 = new Bruch(1, 4); - Bruch summe = bruch5.addiere(bruch8); - System.out.println("Test 11: " + summe.bruchToString()); // Erwartet: 11/12 - - // Test 12: Subtraktion (negatives Ergebnis) - Bruch bruch9 = new Bruch(3, 4); - Bruch differenz = bruch5.subtrahiere(bruch9); - System.out.println("Test 12: " + differenz.bruchToString()); // Erwartet: -1/12 - - // Test 13: Dezimalwert - double dezimalwert = bruch5.dezimalwert(); - System.out.println("Test 13: " + dezimalwert); // Erwartet: 0.6666666666666666 (2/3) - - // Test 14: Dezimalwert eines anderen Bruchs - Bruch bruch10 = new Bruch(3, 4); - double dezimalwert2 = bruch10.dezimalwert(); - System.out.println("Test 14: " + dezimalwert2); // Erwartet: 0.75 - - // Test 16: Dezimalwert eines anderen Bruchs (null) - Bruch bruch11 = new Bruch(3, 0); - double dezimalwert3 = bruch11.dezimalwert(); - System.out.println("Test 15: " + dezimalwert3); // Erwartet: 0 - } -} diff --git a/Code/Steiner/interfacesTwoTesting/.vscode/settings.json b/Code/Steiner/interfacesTwoTesting/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/interfacesTwoTesting/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/interfacesTwoTesting/README.md b/Code/Steiner/interfacesTwoTesting/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/interfacesTwoTesting/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/interfacesTwoTesting/bin/App.class b/Code/Steiner/interfacesTwoTesting/bin/App.class deleted file mode 100644 index c8204af..0000000 Binary files a/Code/Steiner/interfacesTwoTesting/bin/App.class and /dev/null differ diff --git a/Code/Steiner/interfacesTwoTesting/bin/Hans.class b/Code/Steiner/interfacesTwoTesting/bin/Hans.class deleted file mode 100644 index 69677f3..0000000 Binary files a/Code/Steiner/interfacesTwoTesting/bin/Hans.class and /dev/null differ diff --git a/Code/Steiner/interfacesTwoTesting/bin/ISleep.class b/Code/Steiner/interfacesTwoTesting/bin/ISleep.class deleted file mode 100644 index 1beb614..0000000 Binary files a/Code/Steiner/interfacesTwoTesting/bin/ISleep.class and /dev/null differ diff --git a/Code/Steiner/interfacesTwoTesting/bin/IWalk.class b/Code/Steiner/interfacesTwoTesting/bin/IWalk.class deleted file mode 100644 index 12178fc..0000000 Binary files a/Code/Steiner/interfacesTwoTesting/bin/IWalk.class and /dev/null differ diff --git a/Code/Steiner/interfacesTwoTesting/src/App.java b/Code/Steiner/interfacesTwoTesting/src/App.java deleted file mode 100644 index 67852e5..0000000 --- a/Code/Steiner/interfacesTwoTesting/src/App.java +++ /dev/null @@ -1,6 +0,0 @@ -public class App { - public static void main(String[] args) throws Exception { - Hans hans = new Hans(); - hans.walk(); - } -} diff --git a/Code/Steiner/interfacesTwoTesting/src/Hans.java b/Code/Steiner/interfacesTwoTesting/src/Hans.java deleted file mode 100644 index 7087be1..0000000 --- a/Code/Steiner/interfacesTwoTesting/src/Hans.java +++ /dev/null @@ -1,8 +0,0 @@ -public class Hans implements IWalk, ISleep { - - @Override - public void walk() { - System.out.println("Walk"); - } - -} diff --git a/Code/Steiner/interfacesTwoTesting/src/ISleep.java b/Code/Steiner/interfacesTwoTesting/src/ISleep.java deleted file mode 100644 index a0325a4..0000000 --- a/Code/Steiner/interfacesTwoTesting/src/ISleep.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface ISleep { - void walk(); -} diff --git a/Code/Steiner/interfacesTwoTesting/src/IWalk.java b/Code/Steiner/interfacesTwoTesting/src/IWalk.java deleted file mode 100644 index 88cff8e..0000000 --- a/Code/Steiner/interfacesTwoTesting/src/IWalk.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface IWalk { - void walk(); -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/.vscode/settings.json b/Code/Steiner/paymentSystemWithInterfaces/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/README.md b/Code/Steiner/paymentSystemWithInterfaces/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/App.class b/Code/Steiner/paymentSystemWithInterfaces/bin/App.class deleted file mode 100644 index 9fda101..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/App.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/BankTransferPayment.class b/Code/Steiner/paymentSystemWithInterfaces/bin/BankTransferPayment.class deleted file mode 100644 index 2a50e59..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/BankTransferPayment.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/CreditCardPayment.class b/Code/Steiner/paymentSystemWithInterfaces/bin/CreditCardPayment.class deleted file mode 100644 index 8948ff7..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/CreditCardPayment.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/IPay.class b/Code/Steiner/paymentSystemWithInterfaces/bin/IPay.class deleted file mode 100644 index 2b0ff2c..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/IPay.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/PayPalPayment.class b/Code/Steiner/paymentSystemWithInterfaces/bin/PayPalPayment.class deleted file mode 100644 index 06eaa48..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/PayPalPayment.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/bin/Payment.class b/Code/Steiner/paymentSystemWithInterfaces/bin/Payment.class deleted file mode 100644 index 4f7d30f..0000000 Binary files a/Code/Steiner/paymentSystemWithInterfaces/bin/Payment.class and /dev/null differ diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/App.java b/Code/Steiner/paymentSystemWithInterfaces/src/App.java deleted file mode 100644 index 8a2e9cd..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/App.java +++ /dev/null @@ -1,24 +0,0 @@ -public class App { - - public static void main(String[] args) throws Exception { - - Payment creditCard = new CreditCardPayment("1234-5678-9012-3456", "Max Mustermann"); - - Payment paypal = new PayPalPayment("max@example.com"); - - Payment bankTransfer = new BankTransferPayment("DE89 3704 0044 0532 0130 00"); - - processPayment(creditCard, 49.99); - - processPayment(paypal, 19.99); - - processPayment(bankTransfer, 99.99); - - } - - public static void processPayment(Payment payment, double amount) { - payment.pay(amount); - - } - -} \ No newline at end of file diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/BankTransferPayment.java b/Code/Steiner/paymentSystemWithInterfaces/src/BankTransferPayment.java deleted file mode 100644 index 3456c5f..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/BankTransferPayment.java +++ /dev/null @@ -1,12 +0,0 @@ -public class BankTransferPayment extends Payment implements IPay { - String securityNumber; - - public BankTransferPayment(String securityNumber) { - this.securityNumber = securityNumber; - } - - @Override - public void pay(double amount) { - System.out.println("Bezahlung von " + amount + " CHF mit Banktransfer " + securityNumber); - } -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/CreditCardPayment.java b/Code/Steiner/paymentSystemWithInterfaces/src/CreditCardPayment.java deleted file mode 100644 index 50d7a4c..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/CreditCardPayment.java +++ /dev/null @@ -1,14 +0,0 @@ -public class CreditCardPayment extends Payment implements IPay { - String number; - String name; - - public CreditCardPayment(String number, String name) { - this.number = number; - this.name = name; - } - - @Override - public void pay(double amount) { - System.out.println("Bezahlung von " + amount + " CHF mit Kreditkarte " + number + " von " + name); - } -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/IPay.java b/Code/Steiner/paymentSystemWithInterfaces/src/IPay.java deleted file mode 100644 index 2a37728..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/IPay.java +++ /dev/null @@ -1,3 +0,0 @@ -public interface IPay { - public void pay(double amount); -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/PayPalPayment.java b/Code/Steiner/paymentSystemWithInterfaces/src/PayPalPayment.java deleted file mode 100644 index ab4dff7..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/PayPalPayment.java +++ /dev/null @@ -1,12 +0,0 @@ -public class PayPalPayment extends Payment implements IPay { - String mail; - - public PayPalPayment(String mail) { - this.mail = mail; - } - - @Override - public void pay(double amount) { - System.out.println("Bezahlung von " + amount + " CHF mit Kreditkarte " + mail); - } -} diff --git a/Code/Steiner/paymentSystemWithInterfaces/src/Payment.java b/Code/Steiner/paymentSystemWithInterfaces/src/Payment.java deleted file mode 100644 index 8dba32a..0000000 --- a/Code/Steiner/paymentSystemWithInterfaces/src/Payment.java +++ /dev/null @@ -1,3 +0,0 @@ -public abstract class Payment implements IPay { - public abstract void pay(double amount); -} diff --git a/Code/Steiner/tryCatchTask/.vscode/settings.json b/Code/Steiner/tryCatchTask/.vscode/settings.json deleted file mode 100644 index e112a70..0000000 --- a/Code/Steiner/tryCatchTask/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "java.project.sourcePaths": ["src"], - "java.project.outputPath": "bin", - "java.project.referencedLibraries": [ - "lib/**/*.jar" - ] -} diff --git a/Code/Steiner/tryCatchTask/README.md b/Code/Steiner/tryCatchTask/README.md deleted file mode 100644 index 7c03a53..0000000 --- a/Code/Steiner/tryCatchTask/README.md +++ /dev/null @@ -1,18 +0,0 @@ -## Getting Started - -Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. - -## Folder Structure - -The workspace contains two folders by default, where: - -- `src`: the folder to maintain sources -- `lib`: the folder to maintain dependencies - -Meanwhile, the compiled output files will be generated in the `bin` folder by default. - -> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. - -## Dependency Management - -The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/tryCatchTask/bin/App.class b/Code/Steiner/tryCatchTask/bin/App.class deleted file mode 100644 index f809a66..0000000 Binary files a/Code/Steiner/tryCatchTask/bin/App.class and /dev/null differ diff --git a/Code/Steiner/tryCatchTask/src/App.java b/Code/Steiner/tryCatchTask/src/App.java deleted file mode 100644 index 12ad158..0000000 --- a/Code/Steiner/tryCatchTask/src/App.java +++ /dev/null @@ -1,28 +0,0 @@ -import java.io.*; - -public class App { - - public static void main(String[] args) { - try { - readFile("test.txt"); - } catch (FileNotFoundException e) { - System.err.println("Error: The file was not found. Please check the file path."); - } catch (IOException e) { - System.err.println("Error: An I/O error occurred while reading the file."); - } catch (Exception e) { - System.err.println("An unexpected error occurred: " + e.getMessage()); - } - } - - private static void readFile(String fileName) throws IOException { - FileReader f = new FileReader(fileName); - try { - int c; - while ((c = f.read()) != -1) { - System.out.print((char) c); - } - } finally { - f.close(); - } - } -} diff --git a/Code/Steiner/tryCatchTask/test.txt b/Code/Steiner/tryCatchTask/test.txt deleted file mode 100644 index 885e1ff..0000000 --- a/Code/Steiner/tryCatchTask/test.txt +++ /dev/null @@ -1,22 +0,0 @@ -🎉 Super! 🎉 - -Du hast es geschafft. - -Herzliche Gratulation! - -🌟 STEINER 🌟 - -Ein Hauch von Magie in der Luft! - -✨ Die Sterne funkeln, während die Gedanken fliegen. ✨ - -🔮 Zufällige Gedanken: - - Kaffeetassen tanzen im Regen. - Ein fliegender Teppich voller Bücher. - Die Farben des Windes singen Lieder. - -🌈 Lass die Kreativität sprudeln! - - Was wäre, wenn die Fische die Wolken fangen könnten? - Ein Abenteuer im Land der Träume wartet auf dich!