From 57bd6f12e24d04cc9b56b6c4e30afd831d69381d Mon Sep 17 00:00:00 2001 From: Eldar <3009675@stud.hs-mannheim.de> Date: Fri, 21 Jun 2024 08:44:06 +0200 Subject: [PATCH] Aktuell --- PR2_UIB/src/DynamicTree/DynamicTree.java | 17 ----------- .../src/Uebung_Collections/Uebung1_Stack.java | 2 +- .../src/Uebung_Collections/Uebung3_Queue.java | 30 +++++++++---------- .../Uebung_Generics/Sortierung_Aufgabe.java | 2 +- 4 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 PR2_UIB/src/DynamicTree/DynamicTree.java diff --git a/PR2_UIB/src/DynamicTree/DynamicTree.java b/PR2_UIB/src/DynamicTree/DynamicTree.java deleted file mode 100644 index 7c9da33..0000000 --- a/PR2_UIB/src/DynamicTree/DynamicTree.java +++ /dev/null @@ -1,17 +0,0 @@ -package DynamicTree; - -public class DynamicTree > { - - public void add(T e) { - if(root == null) { - root = new TreeElement(e); - } else { - if(e.compareTo(root.value) < 0 ) - root.left = new TreeElement (e); - - else - root.right = new TreeElement (e); - } - } - -} diff --git a/PR2_UIB/src/Uebung_Collections/Uebung1_Stack.java b/PR2_UIB/src/Uebung_Collections/Uebung1_Stack.java index 6dadb76..fd5d4cb 100644 --- a/PR2_UIB/src/Uebung_Collections/Uebung1_Stack.java +++ b/PR2_UIB/src/Uebung_Collections/Uebung1_Stack.java @@ -15,7 +15,7 @@ public class Uebung1_Stack { for(int i = 0 ; i < eingabe.length(); i++) { ausdruck += eingabe.charAt(i); } - StreamTokenizer st = new StreamTokenizer(ausdruck); + // StreamTokenizer st = new StreamTokenizer(ausdruck); } } diff --git a/PR2_UIB/src/Uebung_Collections/Uebung3_Queue.java b/PR2_UIB/src/Uebung_Collections/Uebung3_Queue.java index a3b7734..4eca147 100644 --- a/PR2_UIB/src/Uebung_Collections/Uebung3_Queue.java +++ b/PR2_UIB/src/Uebung_Collections/Uebung3_Queue.java @@ -12,26 +12,26 @@ public class Uebung3_Queue implements Comparator { statusQueue.offer("Bronze"); statusQueue.offer("Silber"); - Queue ausgabe = sortiereNachPrio(statusQueue); + // Queue ausgabe = sortiereNachPrio(statusQueue); - for (String string : ausgabe) { - System.out.println(string); +// for (String string : ausgabe) { +// System.out.println(string); } - } + - public Queue sortiereNachPrio(Queue status){ - - Queue queue = new PriorityQueue(status); - - - Iterator it = queue.iterator(); - - while(it.hasNext()) { +// public Queue sortiereNachPrio(Queue status){ +// +// Queue queue = new PriorityQueue(status); +// +// +// Iterator it = queue.iterator(); +// +// while(it.hasNext()) { +// - - } - } + + @Override public int compare(String o1, String o2) { diff --git a/PR2_UIB/src/Uebung_Generics/Sortierung_Aufgabe.java b/PR2_UIB/src/Uebung_Generics/Sortierung_Aufgabe.java index 004741a..4c0e29c 100644 --- a/PR2_UIB/src/Uebung_Generics/Sortierung_Aufgabe.java +++ b/PR2_UIB/src/Uebung_Generics/Sortierung_Aufgabe.java @@ -13,7 +13,7 @@ public class Sortierung_Aufgabe { zahlen[i] = random; } // Arrays.sort(zahlen); - sortieren(zahlen); + //sortieren(zahlen); System.out.println(Arrays.toString(zahlen)); }