diff --git a/Semester_2/Einheit_01/Datenstrukturen-Grundlagen.ipynb b/Semester_2/Einheit_01/Datenstrukturen-Grundlagen.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..75698e7f9a633d17960cd1fdd32b757ab18b6c2f --- /dev/null +++ b/Semester_2/Einheit_01/Datenstrukturen-Grundlagen.ipynb @@ -0,0 +1,708 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "f0b13807-b3b2-4f55-9581-9f8d4ffaa3b5", + "metadata": {}, + "source": [ + "# <font color='blue'>**Einleitung**</font>\n", + "Die Spezifikation einer **Datenstruktur** legt fest, wie Daten zu\n", + "**verwalten** und miteinander zu **verknüpfen** sind, um in geeigneter Weise auf sie **zuzugreifen** und sie **manipulieren** zu können. \n", + "Somit kommt zusätzlich die Spezifikation der für Zugriff und Manipulation benötigten Operationen hinzu. \n", + "Die Spezifikation kann sowohl nur die Schnittstelle umfassen, über die die Datenstruktur von außen genutzt wird, als auch die konkrete Realisierung der Operation.\n", + "\n", + "Ein **abstrakter Datentyp (ADT)** fasst die wesentlichen **Eigenschaften** und **Operationen**\n", + "einer Datenstruktur zusammen, **ohne** auf deren Realisierung einzugehen. Die Spezifikation\n", + "eines ADTs liefert damit eine Beschreibung einer Datenstruktur unabhängig von ihrer\n", + "Implementierung in einer konkreten Programmiersprache. \n", + "ADTs bilden die Spezifikation einer Schnittstelle nach außen, indem sie Operationen und ihre Funktionalität festlegen.\n", + "\n", + "Eine Datenstruktur kann daher als **konkrete Ausprägung oder Instanz** eines abstrakten Datentyps aufgefaßt werden.\n", + "Abstrakte Datentypen werden bei der objekt-orientieren Programmierung durch das\n", + "**Klassenkonzept** perfekt unterstützt, indem beispielsweise nur die nutzbaren Operationen (Schnittstellen) nach außen hin sichtbar sind. \n", + "\n", + "Die konkrete Implementierung bleibt entsprechend des **Geheimnisprinzips** nach außen hin verborgen.\n", + "Datenstrukturen haben einen nachhaltigen Einfluß auf die **Effizienz** (Speicherplatz\n", + "und Laufzeit) eines Algorithmus. Daher können verschiedene Datenstrukturen dasselbe\n", + "Problem unterschiedlich effizient behandeln, weshalb die Kenntnis von grundlegenden\n", + "Datenstrukturen von Wichtigkeit ist.\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "3b34e520-f385-4530-b2c7-4b6df641d72b", + "metadata": { + "tags": [] + }, + "source": [ + "### <font color='blue'>**Lernziele des Notebooks**</font>\n", + "* Ãœbersicht über Datenstrukturen\n", + "* Wichtige Datenstrukturen \n" + ] + }, + { + "cell_type": "markdown", + "id": "9837909c-0cc2-43bd-9692-bb149a7a87ba", + "metadata": { + "tags": [] + }, + "source": [ + "# <font color='blue'>**Ãœbersicht über Datenstrukturen**</font>\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "f6012101-a726-4880-8bbc-ccfee49d9ceb", + "metadata": {}, + "source": [ + "# <font color='blue'>**Lineare Datenstrukturen**</font>" + ] + }, + { + "cell_type": "markdown", + "id": "e7ac2738-e0bb-4c7f-a03f-10fa7ec5b71e", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Arrays</font>** \n", + "\n", + "Ein Array ist ein Container, der eine **feste Anzahl** von Elementen aufnehmen kann, die alle vom gleichen Typ sein sollten. Die meisten Datenstrukturen verwenden Arrays, um ihre eigene Speicherung und Algorithmen zu implementieren. Die folgenden Begriffe sind wichtig, um das Konzept des Arrays zu verstehen.\n", + "\n", + "* **Element** - Jedes Element, das in einem Array gespeichert ist, wird als Element bezeichnet.\n", + "* **Index** - Jede Position eines Elements in einem Array hat einen numerischen, **ganzahligen Index**, der zur Identifizierung des Elements verwendet wird.\n", + "\n", + "Die wichtigen Methoden eines Arrays sind die zum **Erzeugen/Initialisieren**, zum **lesenden und schreibenden Zugriff** auf die Elemente und zum **Löschen** inklusive der Freigabe des Speicherplatzes. \n", + "\n", + "In Python gibt es als Repräsentaten den `numpy`-Array und den Array aus dem Paket `array`. Hier wird der Array mit einem Datentyp und Initialwerten initialisiert: \n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "79b1e9ee-329b-4ccf-b3ba-37c0e34eb700", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10\n", + "20\n", + "30\n", + "40\n", + "50\n", + "5\n" + ] + } + ], + "source": [ + "from array import *\n", + "\n", + "array1 = array('i', [10,20,30,40,50])\n", + "\n", + "for x in array1:\n", + " print(x)\n", + "\n", + "print(len(array1)) " + ] + }, + { + "cell_type": "markdown", + "id": "3f5698e7-aba2-4934-8db6-75fd96af83a1", + "metadata": {}, + "source": [ + "Mögliche Typecodes dieses Array-Typs sind, wobei 1 byte 8 bit entsprechen: \n", + "| Typecode | Value |\n", + "|---|---|\n", + "| b | `signed integer` der Größe 1 byte |\n", + "| B | `unsigned integer` der Größe 1 byte|\n", + "| c | `character` der Größe 1 byte|\n", + "| i | `signed integer` der Größe 2 bytes|\n", + "| I | `unsigned integer` der Größe 2 bytes|\n", + "| f | `float` der Größe 4 bytes|\n", + "| d | `float` der Größe 8 bytes|\n", + "\n", + "Zugriffe lesend und schreibend: " + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "0d6ee563-7b02-450d-9c3f-be33464477f4", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "20\n", + "90\n", + "3\n" + ] + } + ], + "source": [ + "print( array1[1] )\n", + "array1[1] = 90\n", + "print( array1[1] )\n", + "print (array1.index(40))" + ] + }, + { + "cell_type": "markdown", + "id": "ba33f114-c177-4004-953d-f39157cda77c", + "metadata": { + "tags": [] + }, + "source": [ + "Bei diesem Array sind auch Einfügeoperationen möglich: " + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "e93f4621-f78e-4cd0-858f-31b26e6f2adb", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "10\n", + "60\n", + "60\n", + "90\n", + "30\n", + "40\n", + "50\n", + "7\n" + ] + } + ], + "source": [ + "array1.insert(1,60)\n", + "for x in array1:\n", + " print(x)\n", + "print(len(array1))" + ] + }, + { + "cell_type": "markdown", + "id": "0482c697-a8da-4952-80e1-523cc36812a7", + "metadata": {}, + "source": [ + "Mit einem numpy-Array funktionieren die Funktionen analog, nur dass es die `insert`-Methode dort nicht gibt. " + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "7fc226eb-dab4-4eaa-ad62-8c1397abd824", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Elemente: [10 20 30 40 50]\n", + "Länge: 5\n", + "Element 1: 20\n", + "Element 1: 90\n", + "Index von 40: 3\n" + ] + }, + { + "ename": "AttributeError", + "evalue": "'numpy.ndarray' object has no attribute 'insert'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[34], line 13\u001b[0m\n\u001b[1;32m 9\u001b[0m \u001b[38;5;28mprint\u001b[39m( \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mElement 1: \u001b[39m\u001b[38;5;124m\"\u001b[39m, array2[\u001b[38;5;241m1\u001b[39m] )\n\u001b[1;32m 11\u001b[0m \u001b[38;5;28mprint\u001b[39m( \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mIndex von 40:\u001b[39m\u001b[38;5;124m\"\u001b[39m, array1\u001b[38;5;241m.\u001b[39mindex(\u001b[38;5;241m40\u001b[39m) )\n\u001b[0;32m---> 13\u001b[0m \u001b[43marray2\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43minsert\u001b[49m(\u001b[38;5;241m1\u001b[39m,\u001b[38;5;241m60\u001b[39m)\n", + "\u001b[0;31mAttributeError\u001b[0m: 'numpy.ndarray' object has no attribute 'insert'" + ] + } + ], + "source": [ + "from numpy import array\n", + "\n", + "array2 = array([10,20,30,40,50], 'i')\n", + "print( \"Elemente: \", array2 )\n", + "print( \"Länge: \", len(array2)) \n", + "\n", + "print( \"Element 1: \", array2[1] )\n", + "array2[1] = 90\n", + "print( \"Element 1: \", array2[1] )\n", + "\n", + "print( \"Index von 40:\", array1.index(40) )\n", + "\n", + "array2.insert(1,60)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "965e102c-6035-4f59-9273-ca977af6c11d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "97a85106-b815-4d8b-bc87-ecd93aae5312", + "metadata": {}, + "source": [ + "## **<font color='blue'>Assoziativer Array</font>**\n", + "\n", + "Bei assoziativen Arrays wird nicht notwendigerweise ein ganzzahliger Index zur Adressierung eines Elements verwendet. \n", + "Stattdessen wird ein eindeutiger **Schlüssel** (z.B. ein String) verwendet. \n", + "Eine Implementierung kann z.B. durch Hashtabellen geschehen, bei denen die Elemente in Tabellen abgelegt werden. \n", + "Mittels einer Hash-Funktion wird aus dem Schlüssel der zugehörige Index des Hashtabellen-Eintrags bestimmt. \n", + "Alternative Bezeichnungen des assoziativen Arrays sind Lookup Table, **Dictionary** bei Python oder Map bei C++.\n", + "Gegenüber dem Standard-Array wird die Größe des assoziativen Arrays nicht vorgegeben (vgl. alloc/realloc). \n", + "Dies verlangt Methoden zur dynamischen Speicherzuweisung, um derartige dynamische Datenstrukturen mit einer unbestimmten Anzahl an Elementen zu realisieren.\n", + "\n", + "Die Standard-Operationen sind: **Erzeugen und Löschen, Elemente hinzufügen, zugreifen und löschen**.\n" + ] + }, + { + "cell_type": "markdown", + "id": "123b16d9-ea69-43c7-b298-c09d6f69a65a", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Liste</font>**\n", + "\n", + "Ein Nachteil von Arrays ist, dass Manipulationen wie das Einfügen oder das Löschen von Elementen oder die Herstellung einer Ordnung die Umorganisation der gesamten Struktur erfordern können.\n", + "In vielen Fällen kann man Daten effizienter verwalten, wenn man nicht mit den Dateninhalten selbst arbeitet, sondern mit den Adressen (Referenzen) dieser Datensätze. Im Hauptspeicher können diese Datensätze beliebig verteilt sein. \n", + "Das ist das Konzept einer Liste als dynamische Datenstruktur mit einer variablen Anzahl an Elementen. Der Zugriff erfolgt allerdings weiterhin über einen ganzzahligen Index. \n", + "\n", + "### **<font color='blue'>Verkettete Liste</font>**\n", + "\n", + "Eine sequentielle Anordnung von Datensätzen in Form einer Liste\n", + "entsteht, wenn man jedem Datensatz genau einen **Zeiger** zuordnet, der auf das nächste,\n", + "folgende Listenelement (Nachfolger) zeigt. \n", + "Diese Liste benötigt einen Zeiger auf das erste Listenelement, sofern es vorhanden ist. \n", + "Das **letzte Listenelement** hat keinen Nachfolger mehr, so dass sein Zeiger mit dem Wert NULL oder None das Ende der Liste kennzeichnet.\n", + "Man spricht dann von einer einfach verketteten, linearen Liste, zu deren Spezifikation noch\n", + "ein Startzeiger gehört, der auf das erste Listenelement zeigt. \n", + "\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "b94e75ca-8ffc-4db0-88fd-be4e82dd14cb", + "metadata": {}, + "source": [ + "Die grundlegenden Methoden einer Liste sind\n", + "* **Insert / Einfügen** <br />\n", + "Zum Einfügen eines Wertes innerhalb der Liste erfordert dies das Finden der Einfügestelle sowie\n", + "das Modifizieren des Zeiger vom Vorgänger sowie die Ãœbernahmen des Zeiger auf\n", + "den Nachfolger für das neue Listenelement. Für das Einfügen am Anfang oder Ende\n", + "muss gesondert vorgegangen werden.\n", + "* **Append/Anhängen** <br />\n", + "Zum Anhängen eines Elements an die bestehende Liste. \n", + "* **Find / Suchen** <br />\n", + "Hierzu muss, bis das Element mit dem gegebenen Wert gefunden wurde, die Liste durchlaufen werden, d.h.\n", + "über alle Elemente itertiert werden, was relativ aufwändig sein kann.\n", + "* **Delete / Löschen** <br />\n", + "Hier muss nach dem Auffinden des Elements (über den Index oder den Wert) umgekehrt zum Einfügen vorgegangen\n", + "werden.\n", + "* **Length / Länge** <br />\n", + "Das Bestimmen der aktuellen Länge erfordert ein Durchlaufen aller Listenelemente.\n", + "\n", + "Insbesondere die Operationen Einfügen und Löschen sind auf linearen Listen sehr effizient\n", + "durchführbar, da sie sich auf das **Umsetzen der Zeiger** beschränken. Der größte Aufwand\n", + "ist jedoch das Auffinden der Einfüge- oder Löschposition. (Etwas günstiger ist hierbei die\n", + "doppelt verkettete Liste.)" + ] + }, + { + "cell_type": "markdown", + "id": "b60d32e1", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "id": "9f449c03-0c06-4c5d-b56b-ca8cf4c302fa", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The elements in the linked list are:\n", + "20 10 30 40 \n", + "Number of elements in the linked list are: 4\n" + ] + } + ], + "source": [ + "class Node:\n", + " def __init__(self, data):\n", + " self.data = data\n", + " self.next = None\n", + "\n", + "class LinkedList:\n", + " def __init__(self):\n", + " self.head = None\n", + "\n", + " def printList(self):\n", + " current = self.head\n", + " while current is not None:\n", + " print(current.data, end=\" \")\n", + " current = current.next\n", + " print(\"\")\n", + "\n", + " def insert(self, position, element):\n", + " counter = 1\n", + " current = self.head\n", + " while counter < position - 1 and current is not None:\n", + " counter += 1\n", + " current = current.next\n", + " if position == 1:\n", + " newNode = Node(element)\n", + " newNode.next = current\n", + " self.head = newNode\n", + " else:\n", + " newNode = Node(element)\n", + " newNode.next = current.next\n", + " current.next = newNode\n", + "\n", + " def getSize(self):\n", + " count = 0\n", + " current = self.head\n", + " while current is not None:\n", + " count += 1\n", + " current = current.next\n", + " return count\n", + "\n", + "\n", + "myLinkedList = LinkedList()\n", + "myLinkedList.insert(1, 10)\n", + "myLinkedList.insert(1, 20)\n", + "myLinkedList.insert(3, 30)\n", + "myLinkedList.insert(4, 40)\n", + "\n", + "print(\"The elements in the linked list are:\")\n", + "myLinkedList.printList()\n", + "print(\"Number of elements in the linked list are:\", myLinkedList.getSize() )\n" + ] + }, + { + "cell_type": "markdown", + "id": "2cfaa3aa-d631-4d4e-85e2-3f1a720e72b4", + "metadata": {}, + "source": [ + "Python stellt standardmäßig eine Liste zur Verfügung, die auch das **Slicing** unterstützt:" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "id": "182dab88-1548-40aa-97a2-5bdeaef4591d", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "list1[0]: Physik\n", + "list2[1:5]: [2, 3, 4, 5]\n", + "list1: ['Physik', 2007, 2023]\n", + "list1: ['Physik', 2023]\n" + ] + } + ], + "source": [ + "list1 = ['Physik', 'Chemie', 2007, 2023]\n", + "list2 = [1, 2, 3, 4, 5 ]\n", + "list3 = [\"a\", \"b\", \"c\", \"d\"]\n", + "\n", + "print (\"list1[0]: \", list1[0])\n", + "print (\"list2[1:5]: \", list2[1:5])\n", + "\n", + "# Entfernen eines Datums \n", + "list1.remove( 'Chemie' )\n", + "print (\"list1: \", list1)\n", + "\n", + "# Entfernen eines Elements mit dem Index \n", + "del list1[1]\n", + "print (\"list1: \", list1)\n" + ] + }, + { + "cell_type": "markdown", + "id": "799a4b32-983c-4a25-ace6-0b8038058ead", + "metadata": { + "tags": [] + }, + "source": [ + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "41aafc4c-697d-4646-b9f7-529815dec18b", + "metadata": { + "tags": [] + }, + "source": [ + "\n", + "\n", + "### **<font color='blue'>Stack</font>**\n", + "\n", + "Ein **Stack** bzw. **Stapelspeicher** dient wie eine Liste der Speicherung einer beliebigen Menge\n", + "von Objekten. Das Spezielle sind jedoch die Hinzufüge- und Löschfunktionen, denn das\n", + "Lesen bzw. die **Rückgabe der Elemente** erfolgt in **umgekehrter Reihenfolge** zum Speichern\n", + "nach dem **LIFO-Prinzip** (Last-In First-Out). Beim Lesen wird dabei das **gelesene Element\n", + "gleichzeitig gelöscht**, so dass das folgende Element auf den Anfang bzw. die oberste\n", + "Position nachrückt. Da der Stack eine **dynamische Datenstruktur** ist, kann er\n", + "beliebig wachsen und schrumpfen. Eine Implementierung als verkettete lineare Liste, die\n", + "nur vom Anfang her wachsen und schrumpfen kann, liegt nahe.\n", + "\n", + "Die grundlegenden Methoden eines Stacks sind: \n", + "\n", + "* **Push / Hinzufügen** <br />\n", + "Das Element wird an der obersten Stelle hinzugefügt.\n", + "* **Pop / Auslesen** <br />\n", + "Das oberste Element wird zurückgeliefert und gleichzeitig aus dem Stack gelöscht.\n", + "* **Peek / Ansehen** <br />\n", + "Das oberste Element wird angesehen, ohne dass es entfernt wird.\n", + "* **Length / Länge** <br />\n", + "Liefert die Anzahl der gespeicherten Elemente\n", + "\n", + "Beispiel für das Arbeiten mit einem Stack: \n", + "\n", + "\n", + "\n", + "Die Datenstruktur eines Stacks findet an verschiedenen Stellen Anwendung:\n", + "\n", + "* **Rekursive Programmierung** <br />\n", + "Für jede Instanz einer Prozedur werden die Parameter und lokalen Variablen sowie\n", + "die Rücksprungadresse in Form eines Aktivierungsrecords im Stack gespeichert.\n", + "Nach Prozedurende wird ihr Aktivierungsrecord vom Stack entfernt. Dadurch wird\n", + "ein rekursiver Aufruf von Prozeduren mit verschiedenen Parametern ermöglicht.\n", + "\n", + "* **Klammerstrukturen** <br />\n", + "Die Auswertung von Klammerausdrücken läßt sich einfach mit Hilfe eines Stacks\n", + "für die Operatoren und eines für die Operanden realisieren. \n" + ] + }, + { + "cell_type": "markdown", + "id": "6b51375b", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "id": "6dffe721-926c-41b6-8d66-e758ba2932aa", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Stack: 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 \n", + "Pop: 10\n", + "Pop: 9\n", + "Pop: 8\n", + "Pop: 7\n", + "Pop: 6\n", + "Stack: 5 - 4 - 3 - 2 - 1 \n" + ] + } + ], + "source": [ + "class Node:\n", + " def __init__(self, value):\n", + " self.value = value\n", + " self.next = None\n", + " \n", + "class Stack:\n", + " def __init__(self):\n", + " self.head = Node(\"head\")\n", + " self.size = 0\n", + " \n", + " # String representation of the stack\n", + " def __str__(self):\n", + " cur = self.head.next\n", + " out = \"\"\n", + " while cur:\n", + " out += str(cur.value) + \" - \"\n", + " cur = cur.next\n", + " return out[:-2]\n", + "\n", + " def getSize(self):\n", + " return self.size\n", + "\n", + " def isEmpty(self):\n", + " return self.size == 0\n", + " \n", + " def peek(self):\n", + " if self.isEmpty():\n", + " raise Exception(\"Peeking from an empty stack\")\n", + " return self.head.next.value\n", + "\n", + " def push(self, value):\n", + " node = Node(value)\n", + " node.next = self.head.next\n", + " self.head.next = node\n", + " self.size += 1\n", + "\n", + " def pop(self):\n", + " if self.isEmpty():\n", + " raise Exception(\"Popping from an empty stack\")\n", + " remove = self.head.next\n", + " self.head.next = self.head.next.next\n", + " self.size -= 1\n", + " return remove.value\n", + " \n", + "stack = Stack()\n", + "for i in range(1, 11):\n", + " stack.push(i)\n", + "print(f\"Stack: {stack}\")\n", + "\n", + "for _ in range(1, 6):\n", + " remove = stack.pop()\n", + " print( f\"Pop: {remove}\" )\n", + "print( f\"Stack: {stack}\" )" + ] + }, + { + "cell_type": "markdown", + "id": "ecec5705-75c2-4d73-80a4-05dd37509fd2", + "metadata": {}, + "source": [ + "### **<font color='blue'>Queue</font>**\n", + "\n", + "Wie der Stack dient auch die **Queue** bzw. die **Warteschlange** der dynamischen Speicherung\n", + "einer beliebigen Menge von Objekten. Hier erfolgt jedoch die Rückgabe bzw. das Lesen\n", + "der Objekte in der Reihenfolge des Speicherns bzw. Schreibens, d.h. entsprechend des\n", + "**FIFO-Prinzip**: First-In First-Out.\n", + "\n", + "Die grundlegenden Methoden einer Queue sind: \n", + "\n", + "* **Enqueue / Hinzufügen** <br />\n", + "Hinzufügen eines Objektes am Ende der Warteschlange.\n", + "* **Dequeue / Entnehmen** <br />\n", + "Zurückholen und Entfernen des Objektes an vorderster Stelle." + ] + }, + { + "cell_type": "markdown", + "id": "2060f6e9", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "28748fa8-2bee-4e23-85bb-f944488dc40a", + "metadata": { + "tags": [] + }, + "source": [ + "Die Queue findet z.B. zur **Datenpufferung** bei **asynchronen Prozessen** Anwendung. \n", + "Hierbei schreibt der Sende-Prozess seine Nachrichten in eine Queue, die als Nachrichten-Buffer dient. \n", + "Wenn der Empfänger-Prozess Nachrichten empfangen möchte, liest er den gemeinsamen Buffer d.h. die Queue aus, \n", + "wobei die Schreibreihenfolge beim Auslesen erhalten bleibt.\n", + "\n", + "Eine weitere Anwendung ist ein **Ringpuffer** fester Größe, wie er z.B. bei der Black-Box von\n", + "Flugzeugen benötigt wird. Hier werden kontinuierlich Daten hineingeschrieben. Da der\n", + "Speicher begrenzt ist, müssen die ältesten Daten gelöscht werden, um für die neuen Platz\n", + "zu schaffen.\n" + ] + }, + { + "cell_type": "markdown", + "id": "0ee7be99-b469-4e03-8aa4-e84a73a4fe16", + "metadata": {}, + "source": [ + "### **<font color='blue'>Priority Queue</font>**\n", + "\n", + "Bei dieser **Queue (Vorrangs-/Prioritätswarteschlange)** erfolgt die Reihenfolge des Zurücklieferns nicht nach dem Zeitpunkt des Hineinschreibens (FIFO), sondern nach einem **Prioritätsschlüssel**.\n", + "\n", + "Daher sind ihre Standard-Funktionen\n", + "\n", + "* **Insert / Hinzufügen** <br />\n", + "Hinzufügen eines Objektes, das mit einem Prioritätsschlüssel versehen ist.\n", + "\n", + "* **ExtractMin/ExtractMax / Entnehmen** <br />\n", + "Zurückholen und Entfernen eines Objektes mit dem minimalsten oder maximalsten\n", + "Prioritätsschlüssel.\n", + "\n", + "Wann und wie der Prioritätsschlüssel ausgewertet wird, ist von intern verwendeten Datenstruktur der Queue und der dazu passenden Implementation der Funktionen abhängig. \n", + "Eine übliche Implementierung erfolgt durch Datenstrukturen eines Baums - insbesondere mittels eines Heaps -, die im folgenden Abschnitt besprochen werden.\n" + ] + }, + { + "cell_type": "markdown", + "id": "070cf1de", + "metadata": {}, + "source": [ + "" + ] + } + ], + "metadata": { + "@deathbeds/ipydrawio": { + "xml": "" + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Semester_2/Einheit_01/Pics/Activ.svg b/Semester_2/Einheit_01/Pics/Activ.svg new file mode 100644 index 0000000000000000000000000000000000000000..bdb7d3db360011d4b14ff0d49801016091a05f16 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Activ.svg @@ -0,0 +1 @@ +<?xml version="1.0" encoding="us-ascii" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="470px" preserveAspectRatio="none" style="width:397px;height:470px;background:#FFFFFF;" version="1.1" viewBox="0 0 397 470" width="397px" zoomAndPan="magnify"><defs/><g><ellipse cx="198.5" cy="20" fill="#222222" rx="10" ry="10" style="stroke:#222222;stroke-width:1.0;"/><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="103" x="147" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="83" x="157" y="72.9951">Aktivität1()</text><rect fill="#555555" height="6" rx="2.5" ry="2.5" style="stroke:#555555;stroke-width:1.0;" width="277" x="60" y="106.2969"/><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="111" x="74" y="132.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="91" x="84" y="155.292">Aktivität21()</text><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="110" x="213" y="132.2969"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="90" x="223" y="155.292">Aktivität22()</text><rect fill="#555555" height="6" rx="2.5" ry="2.5" style="stroke:#555555;stroke-width:1.0;" width="277" x="60" y="188.5938"/><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="103" x="147" y="214.5938"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="83" x="157" y="237.5889">Aktivität3()</text><polygon fill="#F1F1F1" points="175,270.8906,222,270.8906,234,282.8906,222,294.8906,175,294.8906,163,282.8906,175,270.8906" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="39" x="179" y="287.7373">Test?</text><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="112" x="11" y="337.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="92" x="21" y="360.4795">Aktivität31()</text><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="111" x="143" y="337.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="91" x="153" y="360.4795">Aktivität32()</text><rect fill="#F1F1F1" height="36.2969" rx="12.5" ry="12.5" style="stroke:#181818;stroke-width:0.5;" width="112" x="274" y="337.4844"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="92" x="284" y="360.4795">Aktivität33()</text><polygon fill="#F1F1F1" points="198.5,393.7813,198.5,393.7813,210.5,405.7813,198.5,417.7813,198.5,417.7813,186.5,405.7813,198.5,393.7813" style="stroke:#181818;stroke-width:0.5;"/><ellipse cx="198.5" cy="448.7813" fill="none" rx="11" ry="11" style="stroke:#222222;stroke-width:1.0;"/><ellipse cx="198.5" cy="448.7813" fill="#222222" rx="6" ry="6" style="stroke:#111111;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="30" y2="50"/><polygon fill="#181818" points="194.5,40,198.5,50,202.5,40,198.5,44" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="129.5" x2="129.5" y1="112.2969" y2="132.2969"/><polygon fill="#181818" points="125.5,122.2969,129.5,132.2969,133.5,122.2969,129.5,126.2969" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="268" x2="268" y1="112.2969" y2="132.2969"/><polygon fill="#181818" points="264,122.2969,268,132.2969,272,122.2969,268,126.2969" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="129.5" x2="129.5" y1="168.5938" y2="188.5938"/><polygon fill="#181818" points="125.5,178.5938,129.5,188.5938,133.5,178.5938,129.5,182.5938" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="268" x2="268" y1="168.5938" y2="188.5938"/><polygon fill="#181818" points="264,178.5938,268,188.5938,272,178.5938,268,182.5938" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="86.2969" y2="106.2969"/><polygon fill="#181818" points="194.5,96.2969,198.5,106.2969,202.5,96.2969,198.5,100.2969" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="194.5938" y2="214.5938"/><polygon fill="#181818" points="194.5,204.5938,198.5,214.5938,202.5,204.5938,198.5,208.5938" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="163" x2="67" y1="282.8906" y2="282.8906"/><line style="stroke:#181818;stroke-width:1.0;" x1="67" x2="67" y1="282.8906" y2="337.4844"/><polygon fill="#181818" points="63,327.4844,67,337.4844,71,327.4844,67,331.4844" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="71" y="315.0342">Fall A</text><line style="stroke:#181818;stroke-width:1.0;" x1="234" x2="330" y1="282.8906" y2="282.8906"/><line style="stroke:#181818;stroke-width:1.0;" x1="330" x2="330" y1="282.8906" y2="337.4844"/><polygon fill="#181818" points="326,327.4844,330,337.4844,334,327.4844,330,331.4844" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="334" y="315.0342">Fall C</text><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="294.8906" y2="309.0885"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="309.0885" y2="337.4844"/><polygon fill="#181818" points="194.5,327.4844,198.5,337.4844,202.5,327.4844,198.5,331.4844" style="stroke:#181818;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="38" x="202.5" y="316.0342">Fall B</text><line style="stroke:#181818;stroke-width:1.0;" x1="67" x2="67" y1="373.7813" y2="405.7813"/><line style="stroke:#181818;stroke-width:1.0;" x1="67" x2="186.5" y1="405.7813" y2="405.7813"/><polygon fill="#181818" points="176.5,401.7813,186.5,405.7813,176.5,409.7813,180.5,405.7813" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="330" x2="330" y1="373.7813" y2="405.7813"/><line style="stroke:#181818;stroke-width:1.0;" x1="330" x2="210.5" y1="405.7813" y2="405.7813"/><polygon fill="#181818" points="220.5,401.7813,210.5,405.7813,220.5,409.7813,216.5,405.7813" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="373.7813" y2="378.7813"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="378.7813" y2="393.7813"/><polygon fill="#181818" points="194.5,383.7813,198.5,393.7813,202.5,383.7813,198.5,387.7813" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="250.8906" y2="270.8906"/><polygon fill="#181818" points="194.5,260.8906,198.5,270.8906,202.5,260.8906,198.5,264.8906" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="198.5" x2="198.5" y1="417.7813" y2="437.7813"/><polygon fill="#181818" points="194.5,427.7813,198.5,437.7813,202.5,427.7813,198.5,431.7813" style="stroke:#181818;stroke-width:1.0;"/><!--SRC=[POz13e8m44NtFSKiOGU5bIuCcf2urWkCfKX3AQGTn7WUR-B5X6eCmknctf__ProjJ8SM6oXaYRscl3LqKWy9SShS3mgDpcL4LbrwaaVH6g-967C2jOG6xn17F8L15LIDKq9BR9FLf6wANa-AWt0Bh6njpM2i6U4JyWJmYigiE9-uD0NuxHb9lASR58aA0ZXBHpi8cK0dnpP7hI4R-p-tnAVD9Ni8OQ7XIyrXPPDyZ_gaJm-ttHi0]--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Aggr_1.svg b/Semester_2/Einheit_01/Pics/Aggr_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..4591ae763da4b7bd7ea5d2963935081612ba85ec --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Aggr_1.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="319px" preserveAspectRatio="none" style="width:339px;height:319px;" version="1.1" viewBox="0 0 339 319" width="339px" zoomAndPan="magnify"><defs><filter height="300%" id="fwvuruolcu15t" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Ganzes--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Ganzes" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="6" y="8"/><ellipse cx="20" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,28.1406 Q17.9688,28.1406 17.0313,27.5313 Q16.1094,26.9219 15.6563,25.8125 Q15.2031,24.7031 15.2031,23.2188 Q15.2031,21.5469 15.7344,20.3594 Q16.2813,19.1563 17.3281,18.5156 Q18.3906,17.8594 19.9375,17.8594 Q20.6563,17.8594 21.2031,18.0156 Q21.7656,18.1563 22.3438,18.4375 L21.6719,20.1094 Q21.1563,19.8438 20.7031,19.75 Q20.2656,19.6406 19.8594,19.6406 Q18.8906,19.6406 18.3125,20.0781 Q17.75,20.5156 17.5,21.2969 Q17.2656,22.0781 17.2656,23.125 Q17.2656,24.7813 17.8438,25.5781 Q18.4375,26.3594 19.75,26.3594 Q20.2344,26.3594 20.75,26.2344 Q21.2656,26.1094 21.9531,25.7969 L21.9531,27.625 Q21.3438,27.8906 20.6875,28.0156 Q20.0469,28.1406 19.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="49" x="33" y="28.432">Ganzes</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="84" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="84" y1="46" y2="46"/><!--class Teil--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Teil" style="stroke: #A80036; stroke-width: 1.5;" width="54" x="18.5" y="135"/><ellipse cx="32.5" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M31.9063,155.1406 Q30.4688,155.1406 29.5313,154.5313 Q28.6094,153.9219 28.1563,152.8125 Q27.7031,151.7031 27.7031,150.2188 Q27.7031,148.5469 28.2344,147.3594 Q28.7813,146.1563 29.8281,145.5156 Q30.8906,144.8594 32.4375,144.8594 Q33.1563,144.8594 33.7031,145.0156 Q34.2656,145.1563 34.8438,145.4375 L34.1719,147.1094 Q33.6563,146.8438 33.2031,146.75 Q32.7656,146.6406 32.3594,146.6406 Q31.3906,146.6406 30.8125,147.0781 Q30.25,147.5156 30,148.2969 Q29.7656,149.0781 29.7656,150.125 Q29.7656,151.7813 30.3438,152.5781 Q30.9375,153.3594 32.25,153.3594 Q32.7344,153.3594 33.25,153.2344 Q33.7656,153.1094 34.4531,152.7969 L34.4531,154.625 Q33.8438,154.8906 33.1875,155.0156 Q32.5469,155.1406 31.9063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="24" x="45.5" y="155.432">Teil</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="19.5" x2="71.5" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="19.5" x2="71.5" y1="173" y2="173"/><!--class Unternehmen--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Unternehmen" style="stroke: #A80036; stroke-width: 1.5;" width="124" x="163.5" y="8"/><ellipse cx="177.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M176.9063,28.1406 Q175.4688,28.1406 174.5313,27.5313 Q173.6094,26.9219 173.1563,25.8125 Q172.7031,24.7031 172.7031,23.2188 Q172.7031,21.5469 173.2344,20.3594 Q173.7813,19.1563 174.8281,18.5156 Q175.8906,17.8594 177.4375,17.8594 Q178.1563,17.8594 178.7031,18.0156 Q179.2656,18.1563 179.8438,18.4375 L179.1719,20.1094 Q178.6563,19.8438 178.2031,19.75 Q177.7656,19.6406 177.3594,19.6406 Q176.3906,19.6406 175.8125,20.0781 Q175.25,20.5156 175,21.2969 Q174.7656,22.0781 174.7656,23.125 Q174.7656,24.7813 175.3438,25.5781 Q175.9375,26.3594 177.25,26.3594 Q177.7344,26.3594 178.25,26.2344 Q178.7656,26.1094 179.4531,25.7969 L179.4531,27.625 Q178.8438,27.8906 178.1875,28.0156 Q177.5469,28.1406 176.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="94" x="190.5" y="28.432">Unternehmen</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="164.5" x2="286.5" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="164.5" x2="286.5" y1="46" y2="46"/><!--class Abteilung--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Abteilung" style="stroke: #A80036; stroke-width: 1.5;" width="96" x="107.5" y="135"/><ellipse cx="121.5" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M120.9063,155.1406 Q119.4688,155.1406 118.5313,154.5313 Q117.6094,153.9219 117.1563,152.8125 Q116.7031,151.7031 116.7031,150.2188 Q116.7031,148.5469 117.2344,147.3594 Q117.7813,146.1563 118.8281,145.5156 Q119.8906,144.8594 121.4375,144.8594 Q122.1563,144.8594 122.7031,145.0156 Q123.2656,145.1563 123.8438,145.4375 L123.1719,147.1094 Q122.6563,146.8438 122.2031,146.75 Q121.7656,146.6406 121.3594,146.6406 Q120.3906,146.6406 119.8125,147.0781 Q119.25,147.5156 119,148.2969 Q118.7656,149.0781 118.7656,150.125 Q118.7656,151.7813 119.3438,152.5781 Q119.9375,153.3594 121.25,153.3594 Q121.7344,153.3594 122.25,153.2344 Q122.7656,153.1094 123.4531,152.7969 L123.4531,154.625 Q122.8438,154.8906 122.1875,155.0156 Q121.5469,155.1406 120.9063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="66" x="134.5" y="155.432">Abteilung</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="108.5" x2="202.5" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="108.5" x2="202.5" y1="173" y2="173"/><!--class Vorstand--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Vorstand" style="stroke: #A80036; stroke-width: 1.5;" width="90" x="238.5" y="135"/><ellipse cx="252.5" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M251.9063,155.1406 Q250.4688,155.1406 249.5313,154.5313 Q248.6094,153.9219 248.1563,152.8125 Q247.7031,151.7031 247.7031,150.2188 Q247.7031,148.5469 248.2344,147.3594 Q248.7813,146.1563 249.8281,145.5156 Q250.8906,144.8594 252.4375,144.8594 Q253.1563,144.8594 253.7031,145.0156 Q254.2656,145.1563 254.8438,145.4375 L254.1719,147.1094 Q253.6563,146.8438 253.2031,146.75 Q252.7656,146.6406 252.3594,146.6406 Q251.3906,146.6406 250.8125,147.0781 Q250.25,147.5156 250,148.2969 Q249.7656,149.0781 249.7656,150.125 Q249.7656,151.7813 250.3438,152.5781 Q250.9375,153.3594 252.25,153.3594 Q252.7344,153.3594 253.25,153.2344 Q253.7656,153.1094 254.4531,152.7969 L254.4531,154.625 Q253.8438,154.8906 253.1875,155.0156 Q252.5469,155.1406 251.9063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="60" x="265.5" y="155.432">Vorstand</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="239.5" x2="327.5" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="239.5" x2="327.5" y1="173" y2="173"/><!--class Mitarbeiter--><rect fill="#FEFECE" filter="url(#fwvuruolcu15t)" height="46" id="Mitarbeiter" style="stroke: #A80036; stroke-width: 1.5;" width="106" x="102.5" y="262"/><ellipse cx="116.5" cy="277" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M115.9063,282.1406 Q114.4688,282.1406 113.5313,281.5313 Q112.6094,280.9219 112.1563,279.8125 Q111.7031,278.7031 111.7031,277.2188 Q111.7031,275.5469 112.2344,274.3594 Q112.7813,273.1563 113.8281,272.5156 Q114.8906,271.8594 116.4375,271.8594 Q117.1563,271.8594 117.7031,272.0156 Q118.2656,272.1563 118.8438,272.4375 L118.1719,274.1094 Q117.6563,273.8438 117.2031,273.75 Q116.7656,273.6406 116.3594,273.6406 Q115.3906,273.6406 114.8125,274.0781 Q114.25,274.5156 114,275.2969 Q113.7656,276.0781 113.7656,277.125 Q113.7656,278.7813 114.3438,279.5781 Q114.9375,280.3594 116.25,280.3594 Q116.7344,280.3594 117.25,280.2344 Q117.7656,280.1094 118.4531,279.7969 L118.4531,281.625 Q117.8438,281.8906 117.1875,282.0156 Q116.5469,282.1406 115.9063,282.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="76" x="129.5" y="282.432">Mitarbeiter</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="103.5" x2="207.5" y1="292" y2="292"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="103.5" x2="207.5" y1="300" y2="300"/><!--link Ganzes to Teil--><path d="M45.5,67.37 C45.5,89.01 45.5,116.05 45.5,134.74 " fill="none" id="Ganzes-Teil" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="45.5,54.06,41.5,60.06,45.5,66.06,49.5,60.06,45.5,54.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="46.5" y="99.9659">besteht aus</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="36.525" y="76.9707">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="36.525" y="122.729">*</text><!--link Unternehmen to Abteilung--><path d="M206.73,65.52 C194.44,87.46 178.73,115.52 167.97,134.74 " fill="none" id="Unternehmen-Abteilung" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="213.15,54.06,206.7272,57.3384,207.2831,64.528,213.7059,61.2496,213.15,54.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="22" x="196.5" y="99.9659">hat</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="201.1647" y="76.9707">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="24" x="144.0846" y="122.729">1..*</text><!--link Unternehmen to Vorstand--><path d="M241.34,66.13 C251.48,87.98 264.34,115.7 273.17,134.74 " fill="none" id="Unternehmen-Vorstand" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="235.74,54.06,234.6384,61.1865,240.7929,64.9443,241.8946,57.8178,235.74,54.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="45" x="258.5" y="99.9659">besitzt</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="229.261" y="76.9707">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="261.6771" y="122.729">1</text><!--link Abteilung to Mitarbeiter--><path d="M155.5,194.37 C155.5,216.01 155.5,243.05 155.5,261.74 " fill="none" id="Abteilung-Mitarbeiter" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="155.5,181.06,151.5,187.06,155.5,193.06,159.5,187.06,155.5,181.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="156.5" y="226.9659">besteht aus</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="146.525" y="203.9707">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="24" x="128.575" y="249.729">1..*</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 + +scale max 1024 width + +class Ganzes + + + +Ganzes "1" o- - "*" Teil : "besteht aus" + +Unternehmen "1" o- - "1..*" Abteilung : "hat" +Unternehmen "1" o- - "1" Vorstand : "besitzt" +Abteilung "1" o- - "1..*" Mitarbeiter : "besteht aus" + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Aktiv_1.svg b/Semester_2/Einheit_01/Pics/Aktiv_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..e920ca09b6c69c9d78ebc0b5d268731484d3857a --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Aktiv_1.svg @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="109px" preserveAspectRatio="none" style="width:195px;height:109px;background:#000000;" version="1.1" viewBox="0 0 195 109" width="195px" zoomAndPan="magnify"><defs/><g><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="188" x="5" y="19.9659">[From Aktiv_1.uml (line 3) ]</text><line style="stroke: #33FF02; stroke-width: 1.0;" x1="5" x2="193" y1="29.0679" y2="29.0679"/><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="73" x="5" y="49.0339">@startuml</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="33" x="5" y="68.1018">start</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="93" x="5" y="87.1697">switch (test?)</text><text fill="#33FF02" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="0" x="9" y="106.2376"/><text fill="#FF0000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="93" x="9" y="106.2376">Syntax Error?</text><!-- +@startuml +start +switch (test?) +case ( condition A ) + :Text 1; +case ( condition B ) + :Text 2; +case ( condition C ) + :Text 3; +case ( condition D ) + :Text 4; +case ( condition E ) + :Text 5; +endswitch +stop +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Assoz_1.svg b/Semester_2/Einheit_01/Pics/Assoz_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..e9d9a92206fb4c1fd5272e118bface1c3236e552 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Assoz_1.svg @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="192px" preserveAspectRatio="none" style="width:418px;height:192px;" version="1.1" viewBox="0 0 418 192" width="418px" zoomAndPan="magnify"><defs><filter height="300%" id="fckae0p4jos6e" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Klasse_1--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Klasse_1" style="stroke: #A80036; stroke-width: 1.5;" width="87" x="6" y="8"/><ellipse cx="20" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,28.1406 Q17.9688,28.1406 17.0313,27.5313 Q16.1094,26.9219 15.6563,25.8125 Q15.2031,24.7031 15.2031,23.2188 Q15.2031,21.5469 15.7344,20.3594 Q16.2813,19.1563 17.3281,18.5156 Q18.3906,17.8594 19.9375,17.8594 Q20.6563,17.8594 21.2031,18.0156 Q21.7656,18.1563 22.3438,18.4375 L21.6719,20.1094 Q21.1563,19.8438 20.7031,19.75 Q20.2656,19.6406 19.8594,19.6406 Q18.8906,19.6406 18.3125,20.0781 Q17.75,20.5156 17.5,21.2969 Q17.2656,22.0781 17.2656,23.125 Q17.2656,24.7813 17.8438,25.5781 Q18.4375,26.3594 19.75,26.3594 Q20.2344,26.3594 20.75,26.2344 Q21.2656,26.1094 21.9531,25.7969 L21.9531,27.625 Q21.3438,27.8906 20.6875,28.0156 Q20.0469,28.1406 19.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="33" y="28.432">Klasse_1</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="92" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="92" y1="46" y2="46"/><!--class Klasse_2--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Klasse_2" style="stroke: #A80036; stroke-width: 1.5;" width="87" x="6" y="135"/><ellipse cx="20" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,155.1406 Q17.9688,155.1406 17.0313,154.5313 Q16.1094,153.9219 15.6563,152.8125 Q15.2031,151.7031 15.2031,150.2188 Q15.2031,148.5469 15.7344,147.3594 Q16.2813,146.1563 17.3281,145.5156 Q18.3906,144.8594 19.9375,144.8594 Q20.6563,144.8594 21.2031,145.0156 Q21.7656,145.1563 22.3438,145.4375 L21.6719,147.1094 Q21.1563,146.8438 20.7031,146.75 Q20.2656,146.6406 19.8594,146.6406 Q18.8906,146.6406 18.3125,147.0781 Q17.75,147.5156 17.5,148.2969 Q17.2656,149.0781 17.2656,150.125 Q17.2656,151.7813 17.8438,152.5781 Q18.4375,153.3594 19.75,153.3594 Q20.2344,153.3594 20.75,153.2344 Q21.2656,153.1094 21.9531,152.7969 L21.9531,154.625 Q21.3438,154.8906 20.6875,155.0156 Q20.0469,155.1406 19.4063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="33" y="155.432">Klasse_2</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="92" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="92" y1="173" y2="173"/><!--class Vorlesung--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Vorlesung" style="stroke: #A80036; stroke-width: 1.5;" width="98" x="154.5" y="8"/><ellipse cx="168.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M167.9063,28.1406 Q166.4688,28.1406 165.5313,27.5313 Q164.6094,26.9219 164.1563,25.8125 Q163.7031,24.7031 163.7031,23.2188 Q163.7031,21.5469 164.2344,20.3594 Q164.7813,19.1563 165.8281,18.5156 Q166.8906,17.8594 168.4375,17.8594 Q169.1563,17.8594 169.7031,18.0156 Q170.2656,18.1563 170.8438,18.4375 L170.1719,20.1094 Q169.6563,19.8438 169.2031,19.75 Q168.7656,19.6406 168.3594,19.6406 Q167.3906,19.6406 166.8125,20.0781 Q166.25,20.5156 166,21.2969 Q165.7656,22.0781 165.7656,23.125 Q165.7656,24.7813 166.3438,25.5781 Q166.9375,26.3594 168.25,26.3594 Q168.7344,26.3594 169.25,26.2344 Q169.7656,26.1094 170.4531,25.7969 L170.4531,27.625 Q169.8438,27.8906 169.1875,28.0156 Q168.5469,28.1406 167.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="68" x="181.5" y="28.432">Vorlesung</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="155.5" x2="251.5" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="155.5" x2="251.5" y1="46" y2="46"/><!--class Vorlesungstermin--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Vorlesungstermin" style="stroke: #A80036; stroke-width: 1.5;" width="150" x="128.5" y="135"/><ellipse cx="142.5" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M141.9063,155.1406 Q140.4688,155.1406 139.5313,154.5313 Q138.6094,153.9219 138.1563,152.8125 Q137.7031,151.7031 137.7031,150.2188 Q137.7031,148.5469 138.2344,147.3594 Q138.7813,146.1563 139.8281,145.5156 Q140.8906,144.8594 142.4375,144.8594 Q143.1563,144.8594 143.7031,145.0156 Q144.2656,145.1563 144.8438,145.4375 L144.1719,147.1094 Q143.6563,146.8438 143.2031,146.75 Q142.7656,146.6406 142.3594,146.6406 Q141.3906,146.6406 140.8125,147.0781 Q140.25,147.5156 140,148.2969 Q139.7656,149.0781 139.7656,150.125 Q139.7656,151.7813 140.3438,152.5781 Q140.9375,153.3594 142.25,153.3594 Q142.7344,153.3594 143.25,153.2344 Q143.7656,153.1094 144.4531,152.7969 L144.4531,154.625 Q143.8438,154.8906 143.1875,155.0156 Q142.5469,155.1406 141.9063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="120" x="155.5" y="155.432">Vorlesungstermin</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="129.5" x2="277.5" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="129.5" x2="277.5" y1="173" y2="173"/><!--class Klasse_3--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Klasse_3" style="stroke: #A80036; stroke-width: 1.5;" width="87" x="314" y="8"/><ellipse cx="328" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M327.4063,28.1406 Q325.9688,28.1406 325.0313,27.5313 Q324.1094,26.9219 323.6563,25.8125 Q323.2031,24.7031 323.2031,23.2188 Q323.2031,21.5469 323.7344,20.3594 Q324.2813,19.1563 325.3281,18.5156 Q326.3906,17.8594 327.9375,17.8594 Q328.6563,17.8594 329.2031,18.0156 Q329.7656,18.1563 330.3438,18.4375 L329.6719,20.1094 Q329.1563,19.8438 328.7031,19.75 Q328.2656,19.6406 327.8594,19.6406 Q326.8906,19.6406 326.3125,20.0781 Q325.75,20.5156 325.5,21.2969 Q325.2656,22.0781 325.2656,23.125 Q325.2656,24.7813 325.8438,25.5781 Q326.4375,26.3594 327.75,26.3594 Q328.2344,26.3594 328.75,26.2344 Q329.2656,26.1094 329.9531,25.7969 L329.9531,27.625 Q329.3438,27.8906 328.6875,28.0156 Q328.0469,28.1406 327.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="341" y="28.432">Klasse_3</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="315" x2="400" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="315" x2="400" y1="46" y2="46"/><!--class Klasse_4--><rect fill="#FEFECE" filter="url(#fckae0p4jos6e)" height="46" id="Klasse_4" style="stroke: #A80036; stroke-width: 1.5;" width="87" x="314" y="135"/><ellipse cx="328" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M327.4063,155.1406 Q325.9688,155.1406 325.0313,154.5313 Q324.1094,153.9219 323.6563,152.8125 Q323.2031,151.7031 323.2031,150.2188 Q323.2031,148.5469 323.7344,147.3594 Q324.2813,146.1563 325.3281,145.5156 Q326.3906,144.8594 327.9375,144.8594 Q328.6563,144.8594 329.2031,145.0156 Q329.7656,145.1563 330.3438,145.4375 L329.6719,147.1094 Q329.1563,146.8438 328.7031,146.75 Q328.2656,146.6406 327.8594,146.6406 Q326.8906,146.6406 326.3125,147.0781 Q325.75,147.5156 325.5,148.2969 Q325.2656,149.0781 325.2656,150.125 Q325.2656,151.7813 325.8438,152.5781 Q326.4375,153.3594 327.75,153.3594 Q328.2344,153.3594 328.75,153.2344 Q329.2656,153.1094 329.9531,152.7969 L329.9531,154.625 Q329.3438,154.8906 328.6875,155.0156 Q328.0469,155.1406 327.4063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="341" y="155.432">Klasse_4</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="315" x2="400" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="315" x2="400" y1="173" y2="173"/><!--link Klasse_1 to Klasse_2--><path d="M49.5,54.06 C49.5,76.77 49.5,111.96 49.5,134.74 " fill="none" id="Klasse_1-Klasse_2" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Vorlesung to Vorlesungstermin--><path d="M203.5,54.06 C203.5,76.77 203.5,111.96 203.5,134.74 " fill="none" id="Vorlesung-Vorlesungstermin" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="194.525" y="76.9707">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="92" x="100.2875" y="122.729">14 {geordnet}</text><!--link Klasse_3 to Klasse_4--><path d="M357.5,54.06 C357.5,76.77 357.5,111.96 357.5,134.74 " fill="none" id="Klasse_3-Klasse_4" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="48" x="358.5" y="99.9659">steuert</text><polygon fill="#000000" points="377.5,109.0679,381.5,117.0679,385.5,109.0679,377.5,109.0679" style="stroke: #000000; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="30" x="324.6406" y="77.0566">rolle</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="335.6406" y="96.1245">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="348.525" y="122.729">*</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 + +scale max 1024 width + +Klasse_1 - - Klasse_2 + +Vorlesung "1" - - "14 {geordnet}" Vorlesungstermin + +Klasse_3 "rolle\n1" - - "*" Klasse_4 : steuert > + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Colla_1.svg b/Semester_2/Einheit_01/Pics/Colla_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..322783be0267b519cce6d535bb6e97c04fc3ce2c --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Colla_1.svg @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="176px" preserveAspectRatio="none" style="width:546px;height:176px;" version="1.1" viewBox="0 0 546 176" width="546px" zoomAndPan="magnify"><defs><filter height="300%" id="f1qcno783g0tfs" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--entity B--><rect fill="#FEFECE" filter="url(#f1qcno783g0tfs)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="141" x="394.5" y="8"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="121" x="404.5" y="32.9659">objekt_b: Klasse_2</text><!--entity A--><rect fill="#FEFECE" filter="url(#f1qcno783g0tfs)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="140" x="6" y="8"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="120" x="16" y="32.9659">objekt_a: Klasse_1</text><!--entity C--><rect fill="#FEFECE" filter="url(#f1qcno783g0tfs)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="139" x="200.5" y="126"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="119" x="210.5" y="150.9659">objekt_c: Klasse_3</text><!--link A to B--><path d="M146.44,27.5 C215.08,27.5 319.08,27.5 389.42,27.5 " fill="none" id="A-B" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="394.42,27.5,385.42,23.5,389.42,27.5,385.42,31.5,394.42,27.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="212" x="164.25" y="20.397">1. nachricht_1(param:int):antwort_1</text><!--link A to C--><path d="M107.17,47.14 C141.96,67.94 198.14,101.53 234.57,123.31 " fill="none" id="A-C" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="238.91,125.91,233.2308,117.8635,234.6162,123.3481,229.1317,124.7335,238.91,125.91" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="154" x="186" y="91.897">2. nachricht_2():antwort_2</text><!--link B to C--><!-- +@startuml +skinparam linestyle ortho + +rectangle "objekt_b: Klasse_2" as B +rectangle "objekt_a: Klasse_1" as A +rectangle "objekt_c: Klasse_3" as C + +A -right-> B: 1. nachricht_1(param:int):antwort_1 +A -right-> C: 2. nachricht_2():antwort_2 +B -[hidden]- C +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Colla_2.svg b/Semester_2/Einheit_01/Pics/Colla_2.svg new file mode 100644 index 0000000000000000000000000000000000000000..59bef00c2b64eb859bebd0cb198f1b6c4d24d46c --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Colla_2.svg @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="276px" preserveAspectRatio="none" style="width:802px;height:276px;" version="1.1" viewBox="0 0 802 276" width="802px" zoomAndPan="magnify"><defs><filter height="300%" id="fimlxtbzjsut6" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--entity Start--><rect fill="#FEFECE" filter="url(#fimlxtbzjsut6)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="40" x="6" y="8"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="20" x="16" y="32.9659">: ...</text><!--entity Res--><rect fill="#FEFECE" filter="url(#fimlxtbzjsut6)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="157" x="225.5" y="8"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="137" x="235.5" y="32.9659">:ArtikelReservierung</text><!--entity Pos--><rect fill="#FEFECE" filter="url(#fimlxtbzjsut6)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="122" x="445" y="126"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="102" x="455" y="150.9659">:BestellPosition</text><!--entity Best--><rect fill="#FEFECE" filter="url(#fimlxtbzjsut6)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="96" x="695" y="8"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="76" x="705" y="32.9659">:Bestellung</text><!--entity Lag--><rect fill="#FEFECE" filter="url(#fimlxtbzjsut6)" height="39.0679" style="stroke: #000000; stroke-width: 1.5;" width="105" x="261.5" y="226"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="85" x="271.5" y="250.9659">:ArtikelLager</text><!--link Start to Res--><path d="M46.44,27.5 C82.6,27.5 159.74,27.5 220.23,27.5 " fill="none" id="Start-Res" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="225.29,27.5,216.29,23.5,220.29,27.5,216.29,31.5,225.29,27.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="143" x="64.25" y="20.397">1. reserviere(bestellung)</text><!--link Res to Best--><path d="M382.74,27.5 C471.29,27.5 612.71,27.5 689.37,27.5 " fill="none" id="Res-Best" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="694.78,27.5,685.78,23.5,689.78,27.5,685.78,31.5,694.78,27.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="276" x="400.75" y="20.397">1.* [i=1...*] gibBestellPosition(i): bestellPosition</text><!--link Res to Pos--><path d="M382.58,42.77 C408.29,50.06 435.9,60.92 458,77 C473.81,88.5 486.36,106.82 494.66,121.47 " fill="none" id="Res-Pos" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="497.1,125.89,496.2639,116.0767,494.6888,121.5098,489.2556,119.9347,497.1,125.89" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="134" x="478" y="91.897">1.i.1 gibArtikel(): artikel</text><!--link Res to Pos--><path d="M300.29,47.04 C298.43,62.01 298.59,82.69 310,96 C314.4,101.14 384.74,117.71 439.91,130.06 " fill="none" id="Res-Pos" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="444.86,131.17,436.9457,125.308,439.9797,130.0823,435.2054,133.1164,444.86,131.17" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="138" x="311" y="91.897">1.i.2 gibAnzahl(): anzahl</text><!--link Res to Lag--><path d="M288.32,47.36 C268.5,73.58 238.61,122.6 253,165 C260.42,186.87 276.55,207.43 290.36,222.17 " fill="none" id="Res-Lag" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="293.81,225.79,290.4978,216.5148,290.361,222.17,284.7058,222.0332,293.81,225.79" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="172" x="254" y="150.897">1.i.3 reserviere(anzahl,artikel)</text><!--link Best to Pos--><!--link Pos to Lag--><!--link Best to Lag--><!--link Start to Lag--><!-- +@startuml +skinparam linestyle ortho + +rectangle ": ..." as Start +rectangle ":ArtikelReservierung" as Res +rectangle ":BestellPosition" as Pos +rectangle ":Bestellung" as Best +rectangle ":ArtikelLager" as Lag + +Start -right-> Res: 1. reserviere(bestellung) +Res -right-> Best: 1.* [i=1...*] gibBestellPosition(i): bestellPosition +Res -right-> Pos: 1.i.1 gibArtikel(): artikel +Res -right-> Pos: 1.i.2 gibAnzahl(): anzahl +Res -right-> Lag: 1.i.3 reserviere(anzahl,artikel) +Best -[hidden]- Pos +Pos -[hidden]- Lag +Best -[hidden]- Lag +Start -[hidden]- Lag +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Datenstrukturen.png b/Semester_2/Einheit_01/Pics/Datenstrukturen.png new file mode 100644 index 0000000000000000000000000000000000000000..a10d764407043a3c9fac32c2813218727fc332d0 Binary files /dev/null and b/Semester_2/Einheit_01/Pics/Datenstrukturen.png differ diff --git a/Semester_2/Einheit_01/Pics/KlammerAuswertung.svg b/Semester_2/Einheit_01/Pics/KlammerAuswertung.svg new file mode 100644 index 0000000000000000000000000000000000000000..57de9b48cb8328e53602e5160a83c09eb199de7a --- /dev/null +++ b/Semester_2/Einheit_01/Pics/KlammerAuswertung.svg @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="581px" preserveAspectRatio="none" style="width:320px;height:581px;" version="1.1" viewBox="0 0 320 581" width="320px" zoomAndPan="magnify"><defs><filter height="300%" id="f168woh7d7kghb" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Stack--><rect fill="#FEFECE" filter="url(#f168woh7d7kghb)" height="160.4075" id="Stack" style="stroke: #A80036; stroke-width: 1.5;" width="109" x="98.5" y="8"/><ellipse cx="132.3" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M131.7063,28.1406 Q130.2688,28.1406 129.3313,27.5313 Q128.4094,26.9219 127.9563,25.8125 Q127.5031,24.7031 127.5031,23.2188 Q127.5031,21.5469 128.0344,20.3594 Q128.5813,19.1563 129.6281,18.5156 Q130.6906,17.8594 132.2375,17.8594 Q132.9563,17.8594 133.5031,18.0156 Q134.0656,18.1563 134.6438,18.4375 L133.9719,20.1094 Q133.4563,19.8438 133.0031,19.75 Q132.5656,19.6406 132.1594,19.6406 Q131.1906,19.6406 130.6125,20.0781 Q130.05,20.5156 129.8,21.2969 Q129.5656,22.0781 129.5656,23.125 Q129.5656,24.7813 130.1438,25.5781 Q130.7375,26.3594 132.05,26.3594 Q132.5344,26.3594 133.05,26.2344 Q133.5656,26.1094 134.2531,25.7969 L134.2531,27.625 Q133.6438,27.8906 132.9875,28.0156 Q132.3469,28.1406 131.7063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="35" x="149.7" y="28.432">Stack</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="99.5" x2="206.5" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="58" x="104.5" y="56.9659">stack:list</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="99.5" x2="206.5" y1="65.0679" y2="65.0679"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="54" x="104.5" y="84.0339">__init__()</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="34" x="104.5" y="103.1018">pop()</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="97" x="104.5" y="122.1697">push(element)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="104.5" y="141.2376">peek()</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="53" x="104.5" y="160.3055">__len__()</text><!--class OperatorStack--><rect fill="#FEFECE" filter="url(#f168woh7d7kghb)" height="65.0679" id="OperatorStack" style="stroke: #A80036; stroke-width: 1.5;" width="126" x="6" y="228"/><ellipse cx="20" cy="243" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,248.1406 Q17.9688,248.1406 17.0313,247.5313 Q16.1094,246.9219 15.6563,245.8125 Q15.2031,244.7031 15.2031,243.2188 Q15.2031,241.5469 15.7344,240.3594 Q16.2813,239.1563 17.3281,238.5156 Q18.3906,237.8594 19.9375,237.8594 Q20.6563,237.8594 21.2031,238.0156 Q21.7656,238.1563 22.3438,238.4375 L21.6719,240.1094 Q21.1563,239.8438 20.7031,239.75 Q20.2656,239.6406 19.8594,239.6406 Q18.8906,239.6406 18.3125,240.0781 Q17.75,240.5156 17.5,241.2969 Q17.2656,242.0781 17.2656,243.125 Q17.2656,244.7813 17.8438,245.5781 Q18.4375,246.3594 19.75,246.3594 Q20.2344,246.3594 20.75,246.2344 Q21.2656,246.1094 21.9531,245.7969 L21.9531,247.625 Q21.3438,247.8906 20.6875,248.0156 Q20.0469,248.1406 19.4063,248.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="96" x="33" y="248.432">OperatorStack</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="131" y1="258" y2="258"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="131" y1="266" y2="266"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="97" x="12" y="284.9659">push(element)</text><!--class OperandenStack--><rect fill="#FEFECE" filter="url(#f168woh7d7kghb)" height="65.0679" id="OperandenStack" style="stroke: #A80036; stroke-width: 1.5;" width="142" x="167" y="228"/><ellipse cx="181" cy="243" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M180.4063,248.1406 Q178.9688,248.1406 178.0313,247.5313 Q177.1094,246.9219 176.6563,245.8125 Q176.2031,244.7031 176.2031,243.2188 Q176.2031,241.5469 176.7344,240.3594 Q177.2813,239.1563 178.3281,238.5156 Q179.3906,237.8594 180.9375,237.8594 Q181.6563,237.8594 182.2031,238.0156 Q182.7656,238.1563 183.3438,238.4375 L182.6719,240.1094 Q182.1563,239.8438 181.7031,239.75 Q181.2656,239.6406 180.8594,239.6406 Q179.8906,239.6406 179.3125,240.0781 Q178.75,240.5156 178.5,241.2969 Q178.2656,242.0781 178.2656,243.125 Q178.2656,244.7813 178.8438,245.5781 Q179.4375,246.3594 180.75,246.3594 Q181.2344,246.3594 181.75,246.2344 Q182.2656,246.1094 182.9531,245.7969 L182.9531,247.625 Q182.3438,247.8906 181.6875,248.0156 Q181.0469,248.1406 180.4063,248.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="112" x="194" y="248.432">OperandenStack</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="168" x2="308" y1="258" y2="258"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="168" x2="308" y1="266" y2="266"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="97" x="173" y="284.9659">push(element)</text><!--class AusdruckAuswerter--><rect fill="#FEFECE" filter="url(#f168woh7d7kghb)" height="217.6113" id="AusdruckAuswerter" style="stroke: #A80036; stroke-width: 1.5;" width="187" x="59.5" y="353"/><ellipse cx="84.75" cy="368" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M84.1563,373.1406 Q82.7188,373.1406 81.7813,372.5313 Q80.8594,371.9219 80.4063,370.8125 Q79.9531,369.7031 79.9531,368.2188 Q79.9531,366.5469 80.4844,365.3594 Q81.0313,364.1563 82.0781,363.5156 Q83.1406,362.8594 84.6875,362.8594 Q85.4063,362.8594 85.9531,363.0156 Q86.5156,363.1563 87.0938,363.4375 L86.4219,365.1094 Q85.9063,364.8438 85.4531,364.75 Q85.0156,364.6406 84.6094,364.6406 Q83.6406,364.6406 83.0625,365.0781 Q82.5,365.5156 82.25,366.2969 Q82.0156,367.0781 82.0156,368.125 Q82.0156,369.7813 82.5938,370.5781 Q83.1875,371.3594 84.5,371.3594 Q84.9844,371.3594 85.5,371.2344 Q86.0156,371.1094 86.7031,370.7969 L86.7031,372.625 Q86.0938,372.8906 85.4375,373.0156 Q84.7969,373.1406 84.1563,373.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="132" x="100.25" y="373.432">AusdruckAuswerter</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="60.5" x2="245.5" y1="383" y2="383"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="157" x="65.5" y="401.9659">op_stack:OperatorStack</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="175" x="65.5" y="421.0339">zahl_stack:OperadenStack</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="72" x="65.5" y="440.1018">zahl:string</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="119" x="65.5" y="459.1697">operatoren:string</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="88" x="65.5" y="478.2376">ziffern:string</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="60.5" x2="245.5" y1="486.3396" y2="486.3396"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="54" x="65.5" y="505.3055">__init__()</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="141" x="65.5" y="524.3734">auswerten(ausdruck)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="143" x="65.5" y="543.4414">berechne_operation()</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="76" x="65.5" y="562.5093">push_zahl()</text><!--link Stack to OperatorStack--><path d="M104.96,186.51 C97.64,201.36 90.57,215.71 84.67,227.7 " fill="none" id="Stack-OperatorStack" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="98.83,183.11,113.95,168.26,111.39,189.29,98.83,183.11" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Stack to OperandenStack--><path d="M201.61,186.51 C209.02,201.36 216.17,215.71 222.15,227.7 " fill="none" id="Stack-OperandenStack" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="195.17,189.28,192.51,168.26,207.7,183.04,195.17,189.28" style="stroke: #A80036; stroke-width: 1.0;"/><!--link OperandenStack to AusdruckAuswerter--><path d="M224.53,293.11 C218.83,306.5 211.78,323.03 204.36,340.44 " fill="none" id="OperandenStack-AusdruckAuswerter" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="199.18,352.61,205.2133,348.6604,203.8879,341.5721,197.8547,345.5217,199.18,352.61" style="stroke: #A80036; stroke-width: 1.0;"/><!--link OperatorStack to AusdruckAuswerter--><path d="M82.31,293.11 C87.95,306.5 94.91,323.03 102.24,340.44 " fill="none" id="OperatorStack-AusdruckAuswerter" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="107.36,352.61,108.7171,345.5277,102.7015,341.5511,101.3445,348.6334,107.36,352.61" style="stroke: #A80036; stroke-width: 1.0;"/><!-- +@startuml +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +class Stack +class OperatorStack +class OperandenStack +class AusdruckAuswerter + +Stack <|- - OperatorStack +Stack <|- - OperandenStack +OperandenStack- -* AusdruckAuswerter +OperatorStack- -* AusdruckAuswerter + +Stack : stack:list +Stack : __init__() +Stack : pop() +Stack : push(element) +Stack : peek() +Stack : __len__() + +OperatorStack : push(element) +OperandenStack : push(element) + +AusdruckAuswerter : op_stack:OperatorStack +AusdruckAuswerter : zahl_stack:OperadenStack +AusdruckAuswerter : zahl:string +AusdruckAuswerter : operatoren:string +AusdruckAuswerter : ziffern:string + +AusdruckAuswerter : __init__() +AusdruckAuswerter : auswerten(ausdruck) +AusdruckAuswerter : berechne_operation() +AusdruckAuswerter : push_zahl() + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Klasse_1.svg b/Semester_2/Einheit_01/Pics/Klasse_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..6760699381f4a51e65cd790141e368ac5949e981 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Klasse_1.svg @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="103px" preserveAspectRatio="none" style="width:517px;height:103px;" version="1.1" viewBox="0 0 517 103" width="517px" zoomAndPan="magnify"><defs><filter height="300%" id="f1shd53hk0u4pz" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Klasse1--><rect fill="#FEFECE" filter="url(#f1shd53hk0u4pz)" height="84.1358" id="Klasse1" style="stroke: #A80036; stroke-width: 1.5;" width="118" x="6" y="8"/><ellipse cx="36.65" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M36.0563,28.1406 Q34.6188,28.1406 33.6813,27.5313 Q32.7594,26.9219 32.3063,25.8125 Q31.8531,24.7031 31.8531,23.2188 Q31.8531,21.5469 32.3844,20.3594 Q32.9313,19.1563 33.9781,18.5156 Q35.0406,17.8594 36.5875,17.8594 Q37.3063,17.8594 37.8531,18.0156 Q38.4156,18.1563 38.9938,18.4375 L38.3219,20.1094 Q37.8063,19.8438 37.3531,19.75 Q36.9156,19.6406 36.5094,19.6406 Q35.5406,19.6406 34.9625,20.0781 Q34.4,20.5156 34.15,21.2969 Q33.9156,22.0781 33.9156,23.125 Q33.9156,24.7813 34.4938,25.5781 Q35.0875,26.3594 36.4,26.3594 Q36.8844,26.3594 37.4,26.2344 Q37.9156,26.1094 38.6031,25.7969 L38.6031,27.625 Q37.9938,27.8906 37.3375,28.0156 Q36.6969,28.1406 36.0563,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="53.35" y="28.432">Klasse1</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="123" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="96" x="12" y="56.9659">data1 : Type_1</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="123" y1="65.0679" y2="65.0679"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="106" x="12" y="84.0339">void method_1()</text><!--class Klasse2--><rect fill="#FEFECE" filter="url(#f1shd53hk0u4pz)" height="84.1358" id="Klasse2" style="stroke: #A80036; stroke-width: 1.5;" width="161" x="159.5" y="8"/><ellipse cx="210.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M209.9063,28.1406 Q208.4688,28.1406 207.5313,27.5313 Q206.6094,26.9219 206.1563,25.8125 Q205.7031,24.7031 205.7031,23.2188 Q205.7031,21.5469 206.2344,20.3594 Q206.7813,19.1563 207.8281,18.5156 Q208.8906,17.8594 210.4375,17.8594 Q211.1563,17.8594 211.7031,18.0156 Q212.2656,18.1563 212.8438,18.4375 L212.1719,20.1094 Q211.6563,19.8438 211.2031,19.75 Q210.7656,19.6406 210.3594,19.6406 Q209.3906,19.6406 208.8125,20.0781 Q208.25,20.5156 208,21.2969 Q207.7656,22.0781 207.7656,23.125 Q207.7656,24.7813 208.3438,25.5781 Q208.9375,26.3594 210.25,26.3594 Q210.7344,26.3594 211.25,26.2344 Q211.7656,26.1094 212.4531,25.7969 L212.4531,27.625 Q211.8438,27.8906 211.1875,28.0156 Q210.5469,28.1406 209.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="229.5" y="28.432">Klasse2</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="160.5" x2="319.5" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="149" x="165.5" y="56.9659">flugNummer : Integer</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="95" x="165.5" y="76.0339">flugZeit : Date</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="160.5" x2="319.5" y1="84.1358" y2="84.1358"/><!--class Klasse3--><rect fill="#FEFECE" filter="url(#f1shd53hk0u4pz)" height="84.1358" id="Klasse3" style="stroke: #A80036; stroke-width: 1.5;" width="151" x="355.5" y="8"/><ellipse cx="401.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M400.9063,28.1406 Q399.4688,28.1406 398.5313,27.5313 Q397.6094,26.9219 397.1563,25.8125 Q396.7031,24.7031 396.7031,23.2188 Q396.7031,21.5469 397.2344,20.3594 Q397.7813,19.1563 398.8281,18.5156 Q399.8906,17.8594 401.4375,17.8594 Q402.1563,17.8594 402.7031,18.0156 Q403.2656,18.1563 403.8438,18.4375 L403.1719,20.1094 Q402.6563,19.8438 402.2031,19.75 Q401.7656,19.6406 401.3594,19.6406 Q400.3906,19.6406 399.8125,20.0781 Q399.25,20.5156 399,21.2969 Q398.7656,22.0781 398.7656,23.125 Q398.7656,24.7813 399.3438,25.5781 Q399.9375,26.3594 401.25,26.3594 Q401.7344,26.3594 402.25,26.2344 Q402.7656,26.1094 403.4531,25.7969 L403.4531,27.625 Q402.8438,27.8906 402.1875,28.0156 Q401.5469,28.1406 400.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="51" x="420.5" y="28.432">Klasse3</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="356.5" x2="505.5" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="139" x="361.5" y="56.9659">#prot_data2 : Type_2</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="356.5" x2="505.5" y1="65.0679" y2="65.0679"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="111" x="361.5" y="84.0339">-priv_method_2()</text><!--link Klasse1 to Klasse2--><!--link Klasse2 to Klasse3--><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 + +scale max 1024 width + +class Klasse1 { + data1 : Type_1 + void method_1() +} + +class Klasse2 { + flugNummer : Integer + flugZeit : Date +} + +class Klasse3 { + # prot_data2 : Type_2 + - priv_method_2() +} + +Klasse1 -[hidden] Klasse2 +Klasse2 -[hidden] Klasse3 + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Komp_1.svg b/Semester_2/Einheit_01/Pics/Komp_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..7cd1bb23b1ae8109733e58360269c75754f25c61 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Komp_1.svg @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="192px" preserveAspectRatio="none" style="width:498px;height:192px;" version="1.1" viewBox="0 0 498 192" width="498px" zoomAndPan="magnify"><defs><filter height="300%" id="fujqshfc7boup" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Ganzes--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Ganzes" style="stroke: #A80036; stroke-width: 1.5;" width="79" x="73.5" y="8"/><ellipse cx="87.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M86.9063,28.1406 Q85.4688,28.1406 84.5313,27.5313 Q83.6094,26.9219 83.1563,25.8125 Q82.7031,24.7031 82.7031,23.2188 Q82.7031,21.5469 83.2344,20.3594 Q83.7813,19.1563 84.8281,18.5156 Q85.8906,17.8594 87.4375,17.8594 Q88.1563,17.8594 88.7031,18.0156 Q89.2656,18.1563 89.8438,18.4375 L89.1719,20.1094 Q88.6563,19.8438 88.2031,19.75 Q87.7656,19.6406 87.3594,19.6406 Q86.3906,19.6406 85.8125,20.0781 Q85.25,20.5156 85,21.2969 Q84.7656,22.0781 84.7656,23.125 Q84.7656,24.7813 85.3438,25.5781 Q85.9375,26.3594 87.25,26.3594 Q87.7344,26.3594 88.25,26.2344 Q88.7656,26.1094 89.4531,25.7969 L89.4531,27.625 Q88.8438,27.8906 88.1875,28.0156 Q87.5469,28.1406 86.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="49" x="100.5" y="28.432">Ganzes</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="74.5" x2="151.5" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="74.5" x2="151.5" y1="46" y2="46"/><!--class Teil--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Teil" style="stroke: #A80036; stroke-width: 1.5;" width="54" x="6" y="135"/><ellipse cx="20" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,155.1406 Q17.9688,155.1406 17.0313,154.5313 Q16.1094,153.9219 15.6563,152.8125 Q15.2031,151.7031 15.2031,150.2188 Q15.2031,148.5469 15.7344,147.3594 Q16.2813,146.1563 17.3281,145.5156 Q18.3906,144.8594 19.9375,144.8594 Q20.6563,144.8594 21.2031,145.0156 Q21.7656,145.1563 22.3438,145.4375 L21.6719,147.1094 Q21.1563,146.8438 20.7031,146.75 Q20.2656,146.6406 19.8594,146.6406 Q18.8906,146.6406 18.3125,147.0781 Q17.75,147.5156 17.5,148.2969 Q17.2656,149.0781 17.2656,150.125 Q17.2656,151.7813 17.8438,152.5781 Q18.4375,153.3594 19.75,153.3594 Q20.2344,153.3594 20.75,153.2344 Q21.2656,153.1094 21.9531,152.7969 L21.9531,154.625 Q21.3438,154.8906 20.6875,155.0156 Q20.0469,155.1406 19.4063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="24" x="33" y="155.432">Teil</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="59" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="59" y1="173" y2="173"/><!--class Existenzabhängiges_Teil--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Existenzabhängiges_Teil" style="stroke: #A80036; stroke-width: 1.5;" width="195" x="95.5" y="135"/><ellipse cx="109.5" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M108.9063,155.1406 Q107.4688,155.1406 106.5313,154.5313 Q105.6094,153.9219 105.1563,152.8125 Q104.7031,151.7031 104.7031,150.2188 Q104.7031,148.5469 105.2344,147.3594 Q105.7813,146.1563 106.8281,145.5156 Q107.8906,144.8594 109.4375,144.8594 Q110.1563,144.8594 110.7031,145.0156 Q111.2656,145.1563 111.8438,145.4375 L111.1719,147.1094 Q110.6563,146.8438 110.2031,146.75 Q109.7656,146.6406 109.3594,146.6406 Q108.3906,146.6406 107.8125,147.0781 Q107.25,147.5156 107,148.2969 Q106.7656,149.0781 106.7656,150.125 Q106.7656,151.7813 107.3438,152.5781 Q107.9375,153.3594 109.25,153.3594 Q109.7344,153.3594 110.25,153.2344 Q110.7656,153.1094 111.4531,152.7969 L111.4531,154.625 Q110.8438,154.8906 110.1875,155.0156 Q109.5469,155.1406 108.9063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="165" x="122.5" y="155.432">Existenzabhängiges_Teil</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="96.5" x2="289.5" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="96.5" x2="289.5" y1="173" y2="173"/><!--class Auto--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Auto" style="stroke: #A80036; stroke-width: 1.5;" width="61" x="372.5" y="8"/><ellipse cx="386.5" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M385.9063,28.1406 Q384.4688,28.1406 383.5313,27.5313 Q382.6094,26.9219 382.1563,25.8125 Q381.7031,24.7031 381.7031,23.2188 Q381.7031,21.5469 382.2344,20.3594 Q382.7813,19.1563 383.8281,18.5156 Q384.8906,17.8594 386.4375,17.8594 Q387.1563,17.8594 387.7031,18.0156 Q388.2656,18.1563 388.8438,18.4375 L388.1719,20.1094 Q387.6563,19.8438 387.2031,19.75 Q386.7656,19.6406 386.3594,19.6406 Q385.3906,19.6406 384.8125,20.0781 Q384.25,20.5156 384,21.2969 Q383.7656,22.0781 383.7656,23.125 Q383.7656,24.7813 384.3438,25.5781 Q384.9375,26.3594 386.25,26.3594 Q386.7344,26.3594 387.25,26.2344 Q387.7656,26.1094 388.4531,25.7969 L388.4531,27.625 Q387.8438,27.8906 387.1875,28.0156 Q386.5469,28.1406 385.9063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="31" x="399.5" y="28.432">Auto</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="373.5" x2="432.5" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="373.5" x2="432.5" y1="46" y2="46"/><!--class Rad--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Rad" style="stroke: #A80036; stroke-width: 1.5;" width="56" x="326" y="135"/><ellipse cx="340" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M339.4063,155.1406 Q337.9688,155.1406 337.0313,154.5313 Q336.1094,153.9219 335.6563,152.8125 Q335.2031,151.7031 335.2031,150.2188 Q335.2031,148.5469 335.7344,147.3594 Q336.2813,146.1563 337.3281,145.5156 Q338.3906,144.8594 339.9375,144.8594 Q340.6563,144.8594 341.2031,145.0156 Q341.7656,145.1563 342.3438,145.4375 L341.6719,147.1094 Q341.1563,146.8438 340.7031,146.75 Q340.2656,146.6406 339.8594,146.6406 Q338.8906,146.6406 338.3125,147.0781 Q337.75,147.5156 337.5,148.2969 Q337.2656,149.0781 337.2656,150.125 Q337.2656,151.7813 337.8438,152.5781 Q338.4375,153.3594 339.75,153.3594 Q340.2344,153.3594 340.75,153.2344 Q341.2656,153.1094 341.9531,152.7969 L341.9531,154.625 Q341.3438,154.8906 340.6875,155.0156 Q340.0469,155.1406 339.4063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="26" x="353" y="155.432">Rad</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="327" x2="381" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="327" x2="381" y1="173" y2="173"/><!--class Motor--><rect fill="#FEFECE" filter="url(#fujqshfc7boup)" height="46" id="Motor" style="stroke: #A80036; stroke-width: 1.5;" width="70" x="417" y="135"/><ellipse cx="431" cy="150" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M430.4063,155.1406 Q428.9688,155.1406 428.0313,154.5313 Q427.1094,153.9219 426.6563,152.8125 Q426.2031,151.7031 426.2031,150.2188 Q426.2031,148.5469 426.7344,147.3594 Q427.2813,146.1563 428.3281,145.5156 Q429.3906,144.8594 430.9375,144.8594 Q431.6563,144.8594 432.2031,145.0156 Q432.7656,145.1563 433.3438,145.4375 L432.6719,147.1094 Q432.1563,146.8438 431.7031,146.75 Q431.2656,146.6406 430.8594,146.6406 Q429.8906,146.6406 429.3125,147.0781 Q428.75,147.5156 428.5,148.2969 Q428.2656,149.0781 428.2656,150.125 Q428.2656,151.7813 428.8438,152.5781 Q429.4375,153.3594 430.75,153.3594 Q431.2344,153.3594 431.75,153.2344 Q432.2656,153.1094 432.9531,152.7969 L432.9531,154.625 Q432.3438,154.8906 431.6875,155.0156 Q431.0469,155.1406 430.4063,155.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="444" y="155.432">Motor</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="418" x2="486" y1="165" y2="165"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="418" x2="486" y1="173" y2="173"/><!--link Ganzes to Teil--><path d="M83.63,64.27 C78.47,70.6 73.36,77.35 69,84 C58.39,100.19 48.82,119.96 42.23,134.84 " fill="none" id="Ganzes-Teil" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="92.24,54.09,85.3095,56.0821,84.4828,63.2456,91.4133,61.2536,92.24,54.09" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="70" y="99.9659">besteht aus</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="78.2047" y="77.008">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="35.5048" y="122.8533">*</text><!--link Ganzes to Existenzabhängiges_Teil--><path d="M139.96,64.38 C144.84,70.74 149.73,77.47 154,84 C164.7,100.35 175.03,119.94 182.38,134.7 " fill="none" id="Ganzes-Existenzabhängiges_Teil" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="131.86,54.13,132.4403,61.3177,139.2983,63.5466,138.718,56.3589,131.86,54.13" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="105" x="167" y="99.9659">komponiert aus</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="127.4821" y="77.0578">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="170.9991" y="123.0888">*</text><!--link Auto to Rad--><path d="M389.5,66.44 C380.95,88.24 370.16,115.79 362.73,134.74 " fill="none" id="Auto-Rad" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="394.35,54.06,388.4362,58.1864,389.9707,65.2324,395.8845,61.1059,394.35,54.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="22" x="383" y="99.9659">hat</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="355.8829" y="122.729">4</text><!--link Auto to Motor--><path d="M416.5,66.44 C425.05,88.24 435.84,115.79 443.27,134.74 " fill="none" id="Auto-Motor" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="411.65,54.06,410.1155,61.1059,416.0293,65.2324,417.5638,58.1864,411.65,54.06" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="22" x="431" y="99.9659">hat</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="423.1921" y="122.729">1</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 + +scale max 1024 width + +class Ganzes + + + +Ganzes "1" o- - "*" Teil : "besteht aus" +Ganzes "1" *- - "*" Existenzabhängiges_Teil: "komponiert aus" + +Auto *- - "4" Rad : "hat" +Auto *- - "1 " Motor : "hat" + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Liste_1.svg b/Semester_2/Einheit_01/Pics/Liste_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..63b61fa80b00027782511fc65a5bd975a7f4f7f1 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Liste_1.svg @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="345px" preserveAspectRatio="none" style="width:475px;height:345px;" version="1.1" viewBox="0 0 475 345" width="475px" zoomAndPan="magnify"><defs><filter height="300%" id="f1lt2gutzqz7zt" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class List--><rect fill="#FEFECE" filter="url(#f1lt2gutzqz7zt)" height="198.5433" id="List" style="stroke: #A80036; stroke-width: 1.5;" width="161" x="6" y="8"/><ellipse cx="71" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M70.4063,28.1406 Q68.9688,28.1406 68.0313,27.5313 Q67.1094,26.9219 66.6563,25.8125 Q66.2031,24.7031 66.2031,23.2188 Q66.2031,21.5469 66.7344,20.3594 Q67.2813,19.1563 68.3281,18.5156 Q69.3906,17.8594 70.9375,17.8594 Q71.6563,17.8594 72.2031,18.0156 Q72.7656,18.1563 73.3438,18.4375 L72.6719,20.1094 Q72.1563,19.8438 71.7031,19.75 Q71.2656,19.6406 70.8594,19.6406 Q69.8906,19.6406 69.3125,20.0781 Q68.75,20.5156 68.5,21.2969 Q68.2656,22.0781 68.2656,23.125 Q68.2656,24.7813 68.8438,25.5781 Q69.4375,26.3594 70.75,26.3594 Q71.2344,26.3594 71.75,26.2344 Q72.2656,26.1094 72.9531,25.7969 L72.9531,27.625 Q72.3438,27.8906 71.6875,28.0156 Q71.0469,28.1406 70.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="23" x="90" y="28.432">List</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="166" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="78" x="12" y="56.9659">head: Node</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="166" y1="65.0679" y2="65.0679"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="97" x="12" y="84.0339">append(Value)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="125" x="12" y="103.1018">insert(index,Value)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="149" x="12" y="122.1697">getValue(index): Value</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="141.2376">delete(index)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="160.3055">delete(Value)</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="102" x="12" y="179.3734">find(Value) : int</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="198.4414">getSize() : int</text><!--class Node--><rect fill="#FEFECE" filter="url(#f1lt2gutzqz7zt)" height="84.1358" id="Node" style="stroke: #A80036; stroke-width: 1.5;" width="121" x="261" y="65.5"/><ellipse cx="299.75" cy="80.5" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M299.1563,85.6406 Q297.7188,85.6406 296.7813,85.0313 Q295.8594,84.4219 295.4063,83.3125 Q294.9531,82.2031 294.9531,80.7188 Q294.9531,79.0469 295.4844,77.8594 Q296.0313,76.6563 297.0781,76.0156 Q298.1406,75.3594 299.6875,75.3594 Q300.4063,75.3594 300.9531,75.5156 Q301.5156,75.6563 302.0938,75.9375 L301.4219,77.6094 Q300.9063,77.3438 300.4531,77.25 Q300.0156,77.1406 299.6094,77.1406 Q298.6406,77.1406 298.0625,77.5781 Q297.5,78.0156 297.25,78.7969 Q297.0156,79.5781 297.0156,80.625 Q297.0156,82.2813 297.5938,83.0781 Q298.1875,83.8594 299.5,83.8594 Q299.9844,83.8594 300.5,83.7344 Q301.0156,83.6094 301.7031,83.2969 L301.7031,85.125 Q301.0938,85.3906 300.4375,85.5156 Q299.7969,85.6406 299.1563,85.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="36" x="318.25" y="85.932">Node</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="262" x2="381" y1="95.5" y2="95.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="103" x="267" y="114.4659">valueRef: Value</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="109" x="267" y="133.5339">nextNode: Node</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="262" x2="381" y1="141.6358" y2="141.6358"/><!--class Value--><rect fill="#FEFECE" filter="url(#f1lt2gutzqz7zt)" height="46" id="Value" style="stroke: #A80036; stroke-width: 1.5;" width="67" x="288" y="288"/><ellipse cx="302" cy="303" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M301.4063,308.1406 Q299.9688,308.1406 299.0313,307.5313 Q298.1094,306.9219 297.6563,305.8125 Q297.2031,304.7031 297.2031,303.2188 Q297.2031,301.5469 297.7344,300.3594 Q298.2813,299.1563 299.3281,298.5156 Q300.3906,297.8594 301.9375,297.8594 Q302.6563,297.8594 303.2031,298.0156 Q303.7656,298.1563 304.3438,298.4375 L303.6719,300.1094 Q303.1563,299.8438 302.7031,299.75 Q302.2656,299.6406 301.8594,299.6406 Q300.8906,299.6406 300.3125,300.0781 Q299.75,300.5156 299.5,301.2969 Q299.2656,302.0781 299.2656,303.125 Q299.2656,304.7813 299.8438,305.5781 Q300.4375,306.3594 301.75,306.3594 Q302.2344,306.3594 302.75,306.2344 Q303.2656,306.1094 303.9531,305.7969 L303.9531,307.625 Q303.3438,307.8906 302.6875,308.0156 Q302.0469,308.1406 301.4063,308.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="37" x="315" y="308.432">Value</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="289" x2="354" y1="318" y2="318"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="289" x2="354" y1="326" y2="326"/><!--link List to Node--><path d="M180.19,107.5 C207.31,107.5 236.19,107.5 260.73,107.5 " fill="none" id="List-Node" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="167.04,107.5,173.04,111.5,179.04,107.5,173.04,103.5,167.04,107.5" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="57" x="185.5" y="99.4659">contains</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="175.0977" y="102.5855">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="20" x="232.9895" y="123.5013">0,1</text><!--link Node to Node--><path d="M395.38,82.94 C408.14,86.26 417,94.45 417,107.5 C417,124.73 401.58,133.47 382.12,133.74 " fill="none" id="Node-Node" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="382.12,81.26,387.5666,85.9859,394.0239,82.776,388.5773,78.05,382.12,81.26" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="423" y="112.9659">refers</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="389.9956" y="72.866">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="20" x="389.8441" y="131.5332">0,1</text><!--link Node to Value--><path d="M321.5,162.84 C321.5,203.83 321.5,257.94 321.5,287.81 " fill="none" id="Node-Value" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#FFFFFF" points="321.5,149.76,317.5,155.76,321.5,161.76,325.5,155.76,321.5,149.76" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="40" x="322.5" y="252.9659">refers</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="312.8875" y="172.6465">1</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="8" x="312.525" y="275.816">1</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +class List{ + head: Node + append(Value) + insert(index,Value) + getValue(index): Value + delete(index) + delete(Value) + find(Value) : int + getSize() : int +} + +class Node{ + valueRef: Value + nextNode: Node +} + +class Value{ +} + +List "1" o-r- "0,1" Node: contains +Node "1" o-r- "0,1" Node: refers +Node "1" o- - "1" Value: refers + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/PrioQueue_1.svg b/Semester_2/Einheit_01/Pics/PrioQueue_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..b188a8fd1b035658af77bb8811fe3fba35d412cd --- /dev/null +++ b/Semester_2/Einheit_01/Pics/PrioQueue_1.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="122px" preserveAspectRatio="none" style="width:180px;height:122px;" version="1.1" viewBox="0 0 180 122" width="180px" zoomAndPan="magnify"><defs><filter height="300%" id="f1hjxk0d1crz70" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class PriorityQueue--><rect fill="#FEFECE" filter="url(#f1hjxk0d1crz70)" height="103.2038" id="PriorityQueue" style="stroke: #A80036; stroke-width: 1.5;" width="163" x="6" y="8"/><ellipse cx="38" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M37.4063,28.1406 Q35.9688,28.1406 35.0313,27.5313 Q34.1094,26.9219 33.6563,25.8125 Q33.2031,24.7031 33.2031,23.2188 Q33.2031,21.5469 33.7344,20.3594 Q34.2813,19.1563 35.3281,18.5156 Q36.3906,17.8594 37.9375,17.8594 Q38.6563,17.8594 39.2031,18.0156 Q39.7656,18.1563 40.3438,18.4375 L39.6719,20.1094 Q39.1563,19.8438 38.7031,19.75 Q38.2656,19.6406 37.8594,19.6406 Q36.8906,19.6406 36.3125,20.0781 Q35.75,20.5156 35.5,21.2969 Q35.2656,22.0781 35.2656,23.125 Q35.2656,24.7813 35.8438,25.5781 Q36.4375,26.3594 37.75,26.3594 Q38.2344,26.3594 38.75,26.2344 Q39.2656,26.1094 39.9531,25.7969 L39.9531,27.625 Q39.3438,27.8906 38.6875,28.0156 Q38.0469,28.1406 37.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="93" x="55" y="28.432">PriorityQueue</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="168" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="168" y1="46" y2="46"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="110" x="12" y="64.9659">insert( element )</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="151" x="12" y="84.0339">extractMin( ) : element</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="103.1018">getSize() : int</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +class PriorityQueue{ + insert( element ) + extractMin( ) : element + getSize() : int +} + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Queue_1.svg b/Semester_2/Einheit_01/Pics/Queue_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..b8f6fb8e46907fb81122ea75a65990968d877686 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Queue_1.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="122px" preserveAspectRatio="none" style="width:168px;height:122px;" version="1.1" viewBox="0 0 168 122" width="168px" zoomAndPan="magnify"><defs><filter height="300%" id="fl8zsc44h645g" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Queue--><rect fill="#FEFECE" filter="url(#fl8zsc44h645g)" height="103.2038" id="Queue" style="stroke: #A80036; stroke-width: 1.5;" width="151" x="6" y="8"/><ellipse cx="55" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M54.4063,28.1406 Q52.9688,28.1406 52.0313,27.5313 Q51.1094,26.9219 50.6563,25.8125 Q50.2031,24.7031 50.2031,23.2188 Q50.2031,21.5469 50.7344,20.3594 Q51.2813,19.1563 52.3281,18.5156 Q53.3906,17.8594 54.9375,17.8594 Q55.6563,17.8594 56.2031,18.0156 Q56.7656,18.1563 57.3438,18.4375 L56.6719,20.1094 Q56.1563,19.8438 55.7031,19.75 Q55.2656,19.6406 54.8594,19.6406 Q53.8906,19.6406 53.3125,20.0781 Q52.75,20.5156 52.5,21.2969 Q52.2656,22.0781 52.2656,23.125 Q52.2656,24.7813 52.8438,25.5781 Q53.4375,26.3594 54.75,26.3594 Q55.2344,26.3594 55.75,26.2344 Q56.2656,26.1094 56.9531,25.7969 L56.9531,27.625 Q56.3438,27.8906 55.6875,28.0156 Q55.0469,28.1406 54.4063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="45" x="74" y="28.432">Queue</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="156" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="156" y1="46" y2="46"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="131" x="12" y="64.9659">enqueue( element )</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="139" x="12" y="84.0339">dequeue( ) : element</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="103.1018">getSize() : int</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +class Queue{ + enqueue( element ) + dequeue( ) : element + getSize() : int +} + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Seq.svg b/Semester_2/Einheit_01/Pics/Seq.svg new file mode 100644 index 0000000000000000000000000000000000000000..4fadedb0f992b306ce074f7680007e380d4141b8 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Seq.svg @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="371px" preserveAspectRatio="none" style="width:611px;height:371px;" version="1.1" viewBox="0 0 611 371" width="611px" zoomAndPan="magnify"><defs><filter height="300%" id="f1hcy1zkcev9q1" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="244.9421" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="172" y="74.7739"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="319" y="106.4799"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="432" y="169.892"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="432" y="233.304"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="14" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="549.5" y="296.716"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="23" x2="23" y1="41.0679" y2="328.716"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="177" x2="177" y1="41.0679" y2="328.716"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="324" x2="324" y1="41.0679" y2="328.716"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="437" x2="437" y1="41.0679" y2="328.716"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="554" x2="554" y1="41.0679" y2="328.716"/><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="26" x="8" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="12" x="15" y="24.9659">...</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="26" x="8" y="327.716"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="12" x="15" y="349.682">...</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="144" x="103" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="130" x="110" y="24.9659">Artikelreservierung</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="144" x="103" y="327.716"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="130" x="110" y="349.682">Artikelreservierung</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="86" x="279" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="72" x="286" y="24.9659">Bestellung</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="86" x="279" y="327.716"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="72" x="286" y="349.682">Bestellung</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="112" x="379" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="98" x="386" y="24.9659">BestellPosition</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="112" x="379" y="327.716"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="98" x="386" y="349.682">BestellPosition</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="95" x="505" y="3"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="512" y="24.9659">ArtikelLager</text><rect fill="#FEFECE" filter="url(#f1hcy1zkcev9q1)" height="33.0679" style="stroke: #A80036; stroke-width: 1.5;" width="95" x="505" y="327.716"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="512" y="349.682">ArtikelLager</text><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="244.9421" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="172" y="74.7739"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="319" y="106.4799"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="432" y="169.892"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="31.706" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="432" y="233.304"/><rect fill="#FFFFFF" filter="url(#f1hcy1zkcev9q1)" height="14" style="stroke: #A80036; stroke-width: 1.0;" width="10" x="549.5" y="296.716"/><polygon fill="#A80036" points="160,70.7739,170,74.7739,160,78.7739,164,74.7739" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="23" x2="166" y1="74.7739" y2="74.7739"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="130" x="30" y="68.9649">reserviere(bestellung)</text><polygon fill="#A80036" points="307,102.4799,317,106.4799,307,110.4799,311,106.4799" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="182" x2="313" y1="106.4799" y2="106.4799"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="118" x="189" y="100.6709">gibBestellPosition(i)</text><polygon fill="#A80036" points="193,134.186,183,138.186,193,142.186,189,138.186" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="187" x2="323" y1="138.186" y2="138.186"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="88" x="199" y="132.377">bestellPosition</text><polygon fill="#A80036" points="420,165.892,430,169.892,420,173.892,424,169.892" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="182" x2="426" y1="169.892" y2="169.892"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="65" x="189" y="164.083">gibArtikel()</text><polygon fill="#A80036" points="193,197.598,183,201.598,193,205.598,189,201.598" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="187" x2="436" y1="201.598" y2="201.598"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="37" x="199" y="195.789">artikel</text><polygon fill="#A80036" points="420,229.304,430,233.304,420,237.304,424,233.304" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="182" x2="426" y1="233.304" y2="233.304"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="67" x="189" y="227.495">gibAnzahl()</text><polygon fill="#A80036" points="193,261.01,183,265.01,193,269.01,189,265.01" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="187" x2="436" y1="265.01" y2="265.01"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="39" x="199" y="259.201">anzahl</text><polygon fill="#A80036" points="537.5,292.716,547.5,296.716,537.5,300.716,541.5,296.716" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="182" x2="543.5" y1="296.716" y2="296.716"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="146" x="189" y="290.907">reserviere(anzahl,artikel)</text><polygon fill="#A80036" points="193,306.716,183,310.716,193,314.716,189,310.716" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 2.0,2.0;" x1="187" x2="553.5" y1="310.716" y2="310.716"/><!-- +@startuml +"..." -> Artikelreservierung: reserviere(bestellung) +activate Artikelreservierung + +Artikelreservierung -> Bestellung: gibBestellPosition(i) +activate Bestellung +Artikelreservierung <- - Bestellung: bestellPosition +deactivate Bestellung + +Artikelreservierung -> BestellPosition: gibArtikel() +activate BestellPosition +Artikelreservierung <- - BestellPosition: artikel +deactivate BestellPosition + +Artikelreservierung -> BestellPosition: gibAnzahl() +activate BestellPosition +Artikelreservierung <- - BestellPosition: anzahl +deactivate BestellPosition + +Artikelreservierung -> ArtikelLager: reserviere(anzahl,artikel) +activate ArtikelLager +Artikelreservierung <- - ArtikelLager: +deactivate ArtikelLager +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Stack_1.png b/Semester_2/Einheit_01/Pics/Stack_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b90256bbcc794922ef797fbe73150c192ee4144a Binary files /dev/null and b/Semester_2/Einheit_01/Pics/Stack_1.png differ diff --git a/Semester_2/Einheit_01/Pics/Stack_1.svg b/Semester_2/Einheit_01/Pics/Stack_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..850344b28854c99d14e2fe9855ae982e1b66e796 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Stack_1.svg @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="160px" preserveAspectRatio="none" style="width:140px;height:160px;" version="1.1" viewBox="0 0 140 160" width="140px" zoomAndPan="magnify"><defs><filter height="300%" id="frb7lq20k0au0" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Stack--><rect fill="#FEFECE" filter="url(#frb7lq20k0au0)" height="141.3396" id="Stack" style="stroke: #A80036; stroke-width: 1.5;" width="123" x="6" y="8"/><ellipse cx="46.1" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M45.5063,28.1406 Q44.0688,28.1406 43.1313,27.5313 Q42.2094,26.9219 41.7563,25.8125 Q41.3031,24.7031 41.3031,23.2188 Q41.3031,21.5469 41.8344,20.3594 Q42.3813,19.1563 43.4281,18.5156 Q44.4906,17.8594 46.0375,17.8594 Q46.7563,17.8594 47.3031,18.0156 Q47.8656,18.1563 48.4438,18.4375 L47.7719,20.1094 Q47.2563,19.8438 46.8031,19.75 Q46.3656,19.6406 45.9594,19.6406 Q44.9906,19.6406 44.4125,20.0781 Q43.85,20.5156 43.6,21.2969 Q43.3656,22.0781 43.3656,23.125 Q43.3656,24.7813 43.9438,25.5781 Q44.5375,26.3594 45.85,26.3594 Q46.3344,26.3594 46.85,26.2344 Q47.3656,26.1094 48.0531,25.7969 L48.0531,27.625 Q47.4438,27.8906 46.7875,28.0156 Q46.1469,28.1406 45.5063,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="35" x="64.9" y="28.432">Stack</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="128" y1="38" y2="38"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="128" y1="46" y2="46"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="105" x="12" y="64.9659">push( element )</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="105" x="12" y="84.0339">pop( ) : element</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="111" x="12" y="103.1018">peek( ) : element</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="87" x="12" y="122.1697">getSize() : int</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="102" x="12" y="141.2376">isEmpty() : bool</text><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +class Stack{ + push( element ) + pop( ) : element + peek( ) : element + getSize() : int + isEmpty() : bool +} + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Stack_2.png b/Semester_2/Einheit_01/Pics/Stack_2.png new file mode 100644 index 0000000000000000000000000000000000000000..2a23f799e758ba38807cd8ff7f23df174683659c Binary files /dev/null and b/Semester_2/Einheit_01/Pics/Stack_2.png differ diff --git a/Semester_2/Einheit_01/Pics/UML_logo.png b/Semester_2/Einheit_01/Pics/UML_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2bf5d6aacceaa1c5e6e74fe64c48f865ae31ad47 Binary files /dev/null and b/Semester_2/Einheit_01/Pics/UML_logo.png differ diff --git a/Semester_2/Einheit_01/Pics/UseCase.svg b/Semester_2/Einheit_01/Pics/UseCase.svg new file mode 100644 index 0000000000000000000000000000000000000000..2477362cd538d1f4b7d2bae6e92ff62e90b48f75 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/UseCase.svg @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="218px" preserveAspectRatio="none" style="width:619px;height:218px;" version="1.1" viewBox="0 0 619 218" width="619px" zoomAndPan="magnify"><defs><filter height="300%" id="f1q3zamejvlamv" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--cluster Softwaresystem--><rect fill="#FFFFFF" filter="url(#f1q3zamejvlamv)" height="91" style="stroke: #000000; stroke-width: 1.5;" width="586" x="22" y="116"/><text fill="#000000" font-family="sans-serif" font-size="14" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="112" x="259" y="132.9659">Softwaresystem</text><ellipse cx="314.9171" cy="172.4834" fill="#FEFECE" filter="url(#f1q3zamejvlamv)" rx="80.4171" ry="18.4834" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="253.9171" y="178.5174">Anwendungsfall 1</text><ellipse cx="118.9171" cy="172.4834" fill="#FEFECE" filter="url(#f1q3zamejvlamv)" rx="80.4171" ry="18.4834" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="57.9171" y="178.5174">Anwendungsfall 2</text><ellipse cx="510.9171" cy="172.4834" fill="#FEFECE" filter="url(#f1q3zamejvlamv)" rx="80.4171" ry="18.4834" style="stroke: #A80036; stroke-width: 1.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="449.9171" y="178.5174">Anwendungsfall 3</text><!--entity Akteur1--><ellipse cx="217" cy="18" fill="#FEFECE" filter="url(#f1q3zamejvlamv)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M217,26 L217,53 M204,34 L230,34 M217,53 L204,68 M217,53 L230,68 " fill="none" filter="url(#f1q3zamejvlamv)" style="stroke: #A80036; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="56" x="189" y="89.9659">Akteur 1</text><!--entity Akteur2--><ellipse cx="511" cy="18" fill="#FEFECE" filter="url(#f1q3zamejvlamv)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M511,26 L511,53 M498,34 L524,34 M511,53 L498,68 M511,53 L524,68 " fill="none" filter="url(#f1q3zamejvlamv)" style="stroke: #A80036; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="56" x="483" y="89.9659">Akteur 2</text><!--link Akteur1 to Fall1--><path d="M245.08,86.24 C262.01,106.89 283.05,132.54 297.6,150.28 " fill="none" id="Akteur1-Fall1" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="300.79,154.17,298.181,144.673,297.6215,150.3021,291.9924,149.7426,300.79,154.17" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Akteur1 to Fall2--><path d="M188.92,86.24 C171.99,106.89 150.95,132.54 136.4,150.28 " fill="none" id="Akteur1-Fall2" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="133.21,154.17,142.0076,149.7426,136.3785,150.3021,135.819,144.673,133.21,154.17" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Akteur2 to Fall3--><path d="M511,94.13 C511,112.61 511,133.55 511,148.98 " fill="none" id="Akteur2-Fall3" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="511,153.99,515,144.99,511,148.99,507,144.99,511,153.99" style="stroke: #A80036; stroke-width: 1.0;"/><!-- +@startuml + +:Akteur 1: as Akteur1 +:Akteur 2: as Akteur2 + +rectangle Softwaresystem { + usecase "Anwendungsfall 1" as Fall1 + usecase "Anwendungsfall 2" as Fall2 + usecase "Anwendungsfall 3" as Fall3 +} + +Akteur1 - -> Fall1 +Akteur1 - -> Fall2 +Akteur2 - -> Fall3 + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Vererb_1.svg b/Semester_2/Einheit_01/Pics/Vererb_1.svg new file mode 100644 index 0000000000000000000000000000000000000000..4eaf75c34d055da964524015f41a388a61a9c854 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Vererb_1.svg @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="266px" preserveAspectRatio="none" style="width:917px;height:266px;" version="1.1" viewBox="0 0 917 266" width="917px" zoomAndPan="magnify"><defs><filter height="300%" id="fjbjjjk2gw2wt" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><!--class Oberklasse--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="46" id="Oberklasse" style="stroke: #A80036; stroke-width: 1.5;" width="105" x="155" y="27"/><ellipse cx="169" cy="42" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M168.4063,47.1406 Q166.9688,47.1406 166.0313,46.5313 Q165.1094,45.9219 164.6563,44.8125 Q164.2031,43.7031 164.2031,42.2188 Q164.2031,40.5469 164.7344,39.3594 Q165.2813,38.1563 166.3281,37.5156 Q167.3906,36.8594 168.9375,36.8594 Q169.6563,36.8594 170.2031,37.0156 Q170.7656,37.1563 171.3438,37.4375 L170.6719,39.1094 Q170.1563,38.8438 169.7031,38.75 Q169.2656,38.6406 168.8594,38.6406 Q167.8906,38.6406 167.3125,39.0781 Q166.75,39.5156 166.5,40.2969 Q166.2656,41.0781 166.2656,42.125 Q166.2656,43.7813 166.8438,44.5781 Q167.4375,45.3594 168.75,45.3594 Q169.2344,45.3594 169.75,45.2344 Q170.2656,45.1094 170.9531,44.7969 L170.9531,46.625 Q170.3438,46.8906 169.6875,47.0156 Q169.0469,47.1406 168.4063,47.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="75" x="182" y="47.432">Oberklasse</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="156" x2="259" y1="57" y2="57"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="156" x2="259" y1="65" y2="65"/><!--class Subklasse_1--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="46" id="Subklasse_1" style="stroke: #A80036; stroke-width: 1.5;" width="111" x="6" y="180.5"/><ellipse cx="20" cy="195.5" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M19.4063,200.6406 Q17.9688,200.6406 17.0313,200.0313 Q16.1094,199.4219 15.6563,198.3125 Q15.2031,197.2031 15.2031,195.7188 Q15.2031,194.0469 15.7344,192.8594 Q16.2813,191.6563 17.3281,191.0156 Q18.3906,190.3594 19.9375,190.3594 Q20.6563,190.3594 21.2031,190.5156 Q21.7656,190.6563 22.3438,190.9375 L21.6719,192.6094 Q21.1563,192.3438 20.7031,192.25 Q20.2656,192.1406 19.8594,192.1406 Q18.8906,192.1406 18.3125,192.5781 Q17.75,193.0156 17.5,193.7969 Q17.2656,194.5781 17.2656,195.625 Q17.2656,197.2813 17.8438,198.0781 Q18.4375,198.8594 19.75,198.8594 Q20.2344,198.8594 20.75,198.7344 Q21.2656,198.6094 21.9531,198.2969 L21.9531,200.125 Q21.3438,200.3906 20.6875,200.5156 Q20.0469,200.6406 19.4063,200.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="33" y="200.932">Subklasse_1</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="116" y1="210.5" y2="210.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="7" x2="116" y1="218.5" y2="218.5"/><!--class Subklasse_2--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="46" id="Subklasse_2" style="stroke: #A80036; stroke-width: 1.5;" width="111" x="152" y="180.5"/><ellipse cx="166" cy="195.5" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M165.4063,200.6406 Q163.9688,200.6406 163.0313,200.0313 Q162.1094,199.4219 161.6563,198.3125 Q161.2031,197.2031 161.2031,195.7188 Q161.2031,194.0469 161.7344,192.8594 Q162.2813,191.6563 163.3281,191.0156 Q164.3906,190.3594 165.9375,190.3594 Q166.6563,190.3594 167.2031,190.5156 Q167.7656,190.6563 168.3438,190.9375 L167.6719,192.6094 Q167.1563,192.3438 166.7031,192.25 Q166.2656,192.1406 165.8594,192.1406 Q164.8906,192.1406 164.3125,192.5781 Q163.75,193.0156 163.5,193.7969 Q163.2656,194.5781 163.2656,195.625 Q163.2656,197.2813 163.8438,198.0781 Q164.4375,198.8594 165.75,198.8594 Q166.2344,198.8594 166.75,198.7344 Q167.2656,198.6094 167.9531,198.2969 L167.9531,200.125 Q167.3438,200.3906 166.6875,200.5156 Q166.0469,200.6406 165.4063,200.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="179" y="200.932">Subklasse_2</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="153" x2="262" y1="210.5" y2="210.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="153" x2="262" y1="218.5" y2="218.5"/><!--class Subklasse_3--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="46" id="Subklasse_3" style="stroke: #A80036; stroke-width: 1.5;" width="111" x="298" y="180.5"/><ellipse cx="312" cy="195.5" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M311.4063,200.6406 Q309.9688,200.6406 309.0313,200.0313 Q308.1094,199.4219 307.6563,198.3125 Q307.2031,197.2031 307.2031,195.7188 Q307.2031,194.0469 307.7344,192.8594 Q308.2813,191.6563 309.3281,191.0156 Q310.3906,190.3594 311.9375,190.3594 Q312.6563,190.3594 313.2031,190.5156 Q313.7656,190.6563 314.3438,190.9375 L313.6719,192.6094 Q313.1563,192.3438 312.7031,192.25 Q312.2656,192.1406 311.8594,192.1406 Q310.8906,192.1406 310.3125,192.5781 Q309.75,193.0156 309.5,193.7969 Q309.2656,194.5781 309.2656,195.625 Q309.2656,197.2813 309.8438,198.0781 Q310.4375,198.8594 311.75,198.8594 Q312.2344,198.8594 312.75,198.7344 Q313.2656,198.6094 313.9531,198.2969 L313.9531,200.125 Q313.3438,200.3906 312.6875,200.5156 Q312.0469,200.6406 311.4063,200.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="81" x="325" y="200.932">Subklasse_3</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="299" x2="408" y1="210.5" y2="210.5"/><line style="stroke: #A80036; stroke-width: 1.5;" x1="299" x2="408" y1="218.5" y2="218.5"/><!--class Figur--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="84.1358" id="Figur" style="stroke: #A80036; stroke-width: 1.5;" width="120" x="594.5" y="8"/><ellipse cx="633.25" cy="23" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M632.6563,28.1406 Q631.2188,28.1406 630.2813,27.5313 Q629.3594,26.9219 628.9063,25.8125 Q628.4531,24.7031 628.4531,23.2188 Q628.4531,21.5469 628.9844,20.3594 Q629.5313,19.1563 630.5781,18.5156 Q631.6406,17.8594 633.1875,17.8594 Q633.9063,17.8594 634.4531,18.0156 Q635.0156,18.1563 635.5938,18.4375 L634.9219,20.1094 Q634.4063,19.8438 633.9531,19.75 Q633.5156,19.6406 633.1094,19.6406 Q632.1406,19.6406 631.5625,20.0781 Q631,20.5156 630.75,21.2969 Q630.5156,22.0781 630.5156,23.125 Q630.5156,24.7813 631.0938,25.5781 Q631.6875,26.3594 633,26.3594 Q633.4844,26.3594 634,26.2344 Q634.5156,26.1094 635.2031,25.7969 L635.2031,27.625 Q634.5938,27.8906 633.9375,28.0156 Q633.2969,28.1406 632.6563,28.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="35" x="651.75" y="28.432">Figur</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="595.5" x2="713.5" y1="38" y2="38"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="108" x="600.5" y="56.9659">position : Vektor</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="96" x="600.5" y="76.0339">sichtbar : bool</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="595.5" x2="713.5" y1="84.1358" y2="84.1358"/><!--class Kreis--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="65.0679" id="Kreis" style="stroke: #A80036; stroke-width: 1.5;" width="116" x="444.5" y="171"/><ellipse cx="481.9" cy="186" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M481.3063,191.1406 Q479.8688,191.1406 478.9313,190.5313 Q478.0094,189.9219 477.5563,188.8125 Q477.1031,187.7031 477.1031,186.2188 Q477.1031,184.5469 477.6344,183.3594 Q478.1813,182.1563 479.2281,181.5156 Q480.2906,180.8594 481.8375,180.8594 Q482.5563,180.8594 483.1031,181.0156 Q483.6656,181.1563 484.2438,181.4375 L483.5719,183.1094 Q483.0563,182.8438 482.6031,182.75 Q482.1656,182.6406 481.7594,182.6406 Q480.7906,182.6406 480.2125,183.0781 Q479.65,183.5156 479.4,184.2969 Q479.1656,185.0781 479.1656,186.125 Q479.1656,187.7813 479.7438,188.5781 Q480.3375,189.3594 481.65,189.3594 Q482.1344,189.3594 482.65,189.2344 Q483.1656,189.1094 483.8531,188.7969 L483.8531,190.625 Q483.2438,190.8906 482.5875,191.0156 Q481.9469,191.1406 481.3063,191.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="34" x="500.1" y="191.432">Kreis</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="445.5" x2="559.5" y1="201" y2="201"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="104" x="450.5" y="219.9659">r { r > 0 } : float</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="445.5" x2="559.5" y1="228.0679" y2="228.0679"/><!--class Dreieck--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="84.1358" id="Dreieck" style="stroke: #A80036; stroke-width: 1.5;" width="118" x="595.5" y="161.5"/><ellipse cx="626.6" cy="176.5" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M626.0063,181.6406 Q624.5688,181.6406 623.6313,181.0313 Q622.7094,180.4219 622.2563,179.3125 Q621.8031,178.2031 621.8031,176.7188 Q621.8031,175.0469 622.3344,173.8594 Q622.8813,172.6563 623.9281,172.0156 Q624.9906,171.3594 626.5375,171.3594 Q627.2563,171.3594 627.8031,171.5156 Q628.3656,171.6563 628.9438,171.9375 L628.2719,173.6094 Q627.7563,173.3438 627.3031,173.25 Q626.8656,173.1406 626.4594,173.1406 Q625.4906,173.1406 624.9125,173.5781 Q624.35,174.0156 624.1,174.7969 Q623.8656,175.5781 623.8656,176.625 Q623.8656,178.2813 624.4438,179.0781 Q625.0375,179.8594 626.35,179.8594 Q626.8344,179.8594 627.35,179.7344 Q627.8656,179.6094 628.5531,179.2969 L628.5531,181.125 Q627.9438,181.3906 627.2875,181.5156 Q626.6469,181.6406 626.0063,181.6406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="50" x="643.4" y="181.932">Dreieck</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="596.5" x2="712.5" y1="191.5" y2="191.5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="104" x="601.5" y="210.4659">a { a > 0 } : float</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="106" x="601.5" y="229.5339">b { b > 0 } : float</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="596.5" x2="712.5" y1="237.6358" y2="237.6358"/><!--class Rechteck--><rect fill="#FEFECE" filter="url(#fjbjjjk2gw2wt)" height="103.2038" id="Rechteck" style="stroke: #A80036; stroke-width: 1.5;" width="157" x="749" y="152"/><ellipse cx="793.5" cy="167" fill="#ADD1B2" rx="10" ry="10" style="stroke: #A80036; stroke-width: 1.0;"/><path d="M792.9063,172.1406 Q791.4688,172.1406 790.5313,171.5313 Q789.6094,170.9219 789.1563,169.8125 Q788.7031,168.7031 788.7031,167.2188 Q788.7031,165.5469 789.2344,164.3594 Q789.7813,163.1563 790.8281,162.5156 Q791.8906,161.8594 793.4375,161.8594 Q794.1563,161.8594 794.7031,162.0156 Q795.2656,162.1563 795.8438,162.4375 L795.1719,164.1094 Q794.6563,163.8438 794.2031,163.75 Q793.7656,163.6406 793.3594,163.6406 Q792.3906,163.6406 791.8125,164.0781 Q791.25,164.5156 791,165.2969 Q790.7656,166.0781 790.7656,167.125 Q790.7656,168.7813 791.3438,169.5781 Q791.9375,170.3594 793.25,170.3594 Q793.7344,170.3594 794.25,170.2344 Q794.7656,170.1094 795.4531,169.7969 L795.4531,171.625 Q794.8438,171.8906 794.1875,172.0156 Q793.5469,172.1406 792.9063,172.1406 Z "/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="60" x="812.5" y="172.432">Rechteck</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="750" x2="905" y1="182" y2="182"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="144" x="755" y="200.9659">a { 0 < a < b+c } : float</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="145" x="755" y="220.0339">b { 0 < b < a+c } : float</text><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="143" x="755" y="239.1018">c { 0 < c < a+b } : float</text><line style="stroke: #A80036; stroke-width: 1.5;" x1="750" x2="905" y1="247.2038" y2="247.2038"/><!--link Oberklasse to Subklasse_1--><path d="M172.34,87.49 C144.4,116.48 106.23,156.09 82.76,180.44 " fill="none" id="Oberklasse-Subklasse_1" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="167.35,82.57,186.27,73.03,177.43,92.29,167.35,82.57" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Oberklasse to Subklasse_2--><path d="M207.5,93.22 C207.5,121.53 207.5,157.66 207.5,180.44 " fill="none" id="Oberklasse-Subklasse_2" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="200.5,93.03,207.5,73.03,214.5,93.03,200.5,93.03" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Oberklasse to Subklasse_3--><path d="M242.66,87.49 C270.6,116.48 308.77,156.09 332.24,180.44 " fill="none" id="Oberklasse-Subklasse_3" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="237.57,92.29,228.73,73.03,247.65,82.57,237.57,92.29" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Figur to Kreis--><path d="M598.77,106.54 C577.07,128.17 552.99,152.18 534.34,170.76 " fill="none" id="Figur-Kreis" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="593.86,101.56,612.97,92.4,603.74,111.47,593.86,101.56" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Figur to Rechteck--><path d="M716.84,105.59 C734.12,120.73 752.8,137.08 769.8,151.97 " fill="none" id="Figur-Rechteck" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="712.21,110.84,701.77,92.4,721.43,100.31,712.21,110.84" style="stroke: #A80036; stroke-width: 1.0;"/><!--link Figur to Dreieck--><path d="M654.5,112.5 C654.5,128.96 654.5,146.35 654.5,161.41 " fill="none" id="Figur-Dreieck" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="none" points="647.5,112.4,654.5,92.4,661.5,112.4,647.5,112.4" style="stroke: #A80036; stroke-width: 1.0;"/><!-- +@startuml + +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 + +scale max 1024 width + +Oberklasse <|- - Subklasse_1 +Oberklasse <|- - Subklasse_2 +Oberklasse <|- - Subklasse_3 + +class Figur { + position : Vektor + sichtbar : bool +} + +class Kreis { + r { r > 0 } : float +} + +class Dreieck { + a { a > 0 } : float + b { b > 0 } : float +} + +class Rechteck { + a { 0 < a < b+c } : float + b { 0 < b < a+c } : float + c { 0 < c < a+b } : float +} + +Figur <|- - Kreis +Figur <|- - Rechteck +Figur <|- - Dreieck + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/Pics/Verkettete-Liste.png b/Semester_2/Einheit_01/Pics/Verkettete-Liste.png new file mode 100644 index 0000000000000000000000000000000000000000..22a9119a1064fd002f9787f697b1011f6bad44c9 Binary files /dev/null and b/Semester_2/Einheit_01/Pics/Verkettete-Liste.png differ diff --git a/Semester_2/Einheit_01/Pics/Zeichen.svg b/Semester_2/Einheit_01/Pics/Zeichen.svg new file mode 100644 index 0000000000000000000000000000000000000000..7dffb61146804631960dc7ca0b47c6fd9ec21505 --- /dev/null +++ b/Semester_2/Einheit_01/Pics/Zeichen.svg @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="646px" preserveAspectRatio="none" style="width:487px;height:646px;" version="1.1" viewBox="0 0 487 646" width="487px" zoomAndPan="magnify"><defs><filter height="300%" id="f6r0ema1rbk57" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><ellipse cx="285.5" cy="18" fill="#000000" filter="url(#f6r0ema1rbk57)" rx="10" ry="10" style="stroke: none; stroke-width: 1.0;"/><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="188" x="191.5" y="69"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="168" x="201.5" y="93.9659">nehme nächstes Zeichen</text><polygon fill="#FEFECE" filter="url(#f6r0ema1rbk57)" points="285.5,149,297.5,161,285.5,173,273.5,161,285.5,149" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="202" x="254.5" y="234"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="182" x="264.5" y="258.9659">operanden stack push zahl</text><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="222" x="254.5" y="396"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="202" x="264.5" y="420.9659">operandenstack push zeichen</text><ellipse cx="232.5" cy="625" fill="none" filter="url(#f6r0ema1rbk57)" rx="10" ry="10" style="stroke: #000000; stroke-width: 1.0;"/><ellipse cx="233" cy="625.5" fill="#000000" rx="6" ry="6" style="stroke: none; stroke-width: 1.0;"/><polygon fill="#FEFECE" filter="url(#f6r0ema1rbk57)" points="219.5,241.5,231.5,253.5,219.5,265.5,207.5,253.5,219.5,241.5" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="195" x="6" y="293"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="175" x="16" y="317.9659">hänge Zeichen an Zahl an</text><polygon fill="#FEFECE" filter="url(#f6r0ema1rbk57)" points="219.5,352,231.5,364,219.5,376,207.5,364,219.5,352" style="stroke: #A80036; stroke-width: 1.5;"/><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="204" x="130.5" y="455"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="184" x="140.5" y="479.9659">operanden_stack push zahl</text><rect fill="#FEFECE" filter="url(#f6r0ema1rbk57)" height="39.0679" rx="12.5" ry="12.5" style="stroke: #A80036; stroke-width: 1.5;" width="160" x="152.5" y="535"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="140" x="162.5" y="559.9659">operation auswerten</text><!--link start to nehme nächstes Zeichen--><path d="M285.5,28.24 C285.5,37.31 285.5,51.54 285.5,63.78 " fill="none" id="start-nehme nächstes Zeichen" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="285.5,68.88,289.5,59.88,285.5,63.88,281.5,59.88,285.5,68.88" style="stroke: #A80036; stroke-width: 1.0;"/><!--link nehme nächstes Zeichen to #5--><path d="M285.5,108.02 C285.5,119 285.5,132.8 285.5,143.42 " fill="none" id="nehme nächstes Zeichen-#5" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="285.5,148.65,289.5,139.65,285.5,143.65,281.5,139.65,285.5,148.65" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="144" x="121.25" y="138.4802">Zeichen == Operator?</text><!--link #5 to operanden stack push zahl--><path d="M290.31,168.22 C299.98,180.72 322.21,209.46 338.01,229.89 " fill="none" id="#5-operanden stack push zahl" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="341.08,233.86,338.7215,224.2977,338.0142,229.9102,332.4018,229.2029,341.08,233.86" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="28" x="325.5" y="208.9659">true</text><!--link operanden stack push zahl to operandenstack push zeichen--><path d="M356.67,273.17 C358.49,302.31 362.01,358.6 364.01,390.64 " fill="none" id="operanden stack push zahl-operandenstack push zeichen" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="364.34,395.95,367.7675,386.7168,364.0263,390.9598,359.7833,387.2187,364.34,395.95" style="stroke: #A80036; stroke-width: 1.0;"/><!--link operandenstack push zeichen to end--><path d="M364.98,435.07 C363.18,466.8 355.42,532.1 322.5,574 C302.83,599.03 266.97,613.43 246.97,619.88 " fill="none" id="operandenstack push zeichen-end" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="242.01,621.42,251.7891,622.5902,246.788,619.9466,249.4316,614.9454,242.01,621.42" style="stroke: #A80036; stroke-width: 1.0;"/><!--link #5 to #14--><path d="M280.75,168.51 C269.53,183.9 241.25,222.68 227.4,241.67 " fill="none" id="#5-#14" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="224.2,246.05,232.7388,241.142,227.1494,242.0125,226.2789,236.423,224.2,246.05" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="109" x="90.9225" y="233.7694">Zeichen in [0-9.]</text><!--link #14 to hänge Zeichen an Zahl an--><path d="M211.89,258.24 C198.6,264.77 170.27,278.69 145.9,290.66 " fill="none" id="#14-hänge Zeichen an Zahl an" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="141.4,292.88,151.2418,292.5083,145.8892,290.6783,147.7191,285.3256,141.4,292.88" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="28" x="147.86" y="270.4159">true</text><!--link hänge Zeichen an Zahl an to end--><path d="M102.32,332.11 C101.14,352.36 99.5,385.72 99.5,414.5 C99.5,414.5 99.5,414.5 99.5,555.5 C99.5,608.01 182.46,620.31 217.34,623.15 " fill="none" id="hänge Zeichen an Zahl an-end" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="222.5,623.53,213.822,618.8724,217.5138,623.1585,213.2277,626.8503,222.5,623.53" style="stroke: #A80036; stroke-width: 1.0;"/><!--link #14 to #20--><path d="M219.5,265.7 C219.5,284.95 219.5,324.38 219.5,346.68 " fill="none" id="#14-#20" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="219.5,351.7,223.5,342.7,219.5,346.7,215.5,342.7,219.5,351.7" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="79" x="137.7724" y="340.0155">Zeichen = ')'</text><!--link #20 to operanden_stack push zahl--><path d="M217.18,374.18 C214.15,387.68 209.74,413.59 214.5,435 C215.63,440.08 217.5,445.28 219.62,450.15 " fill="none" id="#20-operanden_stack push zahl" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="221.81,454.89,221.69,445.0419,219.7238,450.346,214.4196,448.3798,221.81,454.89" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="28" x="215.5" y="420.9659">true</text><!--link operanden_stack push zahl to operation auswerten--><path d="M232.5,494.38 C232.5,505.02 232.5,518.4 232.5,529.74 " fill="none" id="operanden_stack push zahl-operation auswerten" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="232.5,534.79,236.5,525.79,232.5,529.79,228.5,525.79,232.5,534.79" style="stroke: #A80036; stroke-width: 1.0;"/><!--link operation auswerten to end--><path d="M232.5,574.22 C232.5,585.42 232.5,599.43 232.5,609.73 " fill="none" id="operation auswerten-end" style="stroke: #A80036; stroke-width: 1.0;"/><polygon fill="#A80036" points="232.5,614.74,236.5,605.74,232.5,609.74,228.5,605.74,232.5,614.74" style="stroke: #A80036; stroke-width: 1.0;"/><!-- +@startuml +skinparam defaultFontSize 14 +skinparam classAttributeIconSize 0 +scale max 1024 width + +(*) - -> "nehme nächstes Zeichen" + +if "Zeichen == Operator?" then + - ->[true] "operanden stack push zahl" + - -> "operandenstack push zeichen" + - -> (*) +else + if "Zeichen in [0-9.]" then + ->[true] "hänge Zeichen an Zahl an" + - -> (*) + else + if "Zeichen = ')'" then + - ->[true] "operanden_stack push zahl" + - -> "operation auswerten" + - -> (*) + endif + endif +endif + +@enduml + +PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018) +(GPL source distribution) +Java Runtime: OpenJDK Runtime Environment +JVM: OpenJDK 64-Bit Server VM +Java Version: 11.0.18+10-post-Ubuntu-0ubuntu120.04.1 +Operating System: Linux +OS Version: 5.15.0-69-generic +Default Encoding: UTF-8 +Language: de +Country: DE +--></g></svg> \ No newline at end of file diff --git a/Semester_2/Einheit_01/UML-Grundlagen.ipynb b/Semester_2/Einheit_01/UML-Grundlagen.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..e2d6fd4e71269d27877d3bf32bfd37030f62ab32 --- /dev/null +++ b/Semester_2/Einheit_01/UML-Grundlagen.ipynb @@ -0,0 +1,410 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "f0b13807-b3b2-4f55-9581-9f8d4ffaa3b5", + "metadata": {}, + "source": [ + "# <font color='blue'>**Einleitung**</font>\n", + "Die Komplexität von neuen Systemen lässt sich schwerlich im Kopf beherrschen. Für die schrittweise Zerlegung der Aufgabenstellung und Entwicklung von Modellen auch im Bereich der Softwareentwicklung sind graphische Notationen sehr hilfreich. Im Bereich der objekt-orientierten Softwaretechnik hat sich die *Unified Modeling Language* - kurz UML - als hilfreich erwiesen. \n", + "<div>\n", + "<img src=\"Pics/UML_logo.png\" width=\"200\"/>\n", + "</div>\n", + "Die UML ist als universelle grafische Modellierungssprache eine Notation\n", + "und keine Methode. Sie unterstützt alle Phasen der Modellierung, d.h. sie erlaubt die\n", + "Spezifikation, die Konstruktion bzw. der Entwurf, die Visualisierung der Modelle und\n", + "deren Dokumentation. Somit kann man mittels der UML die statischen und dynamischen\n", + "Strukturen entwickeln.\n", + "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "3b34e520-f385-4530-b2c7-4b6df641d72b", + "metadata": { + "tags": [] + }, + "source": [ + "### <font color='blue'>**Lernziele des Notebooks**</font>\n", + "* Ãœbersicht über die UML\n", + "* Wichtige Diagrammarten\n", + " * Klassen und Objektdiagramm \n", + " * Aktivitätsdiagramm" + ] + }, + { + "cell_type": "markdown", + "id": "9837909c-0cc2-43bd-9692-bb149a7a87ba", + "metadata": { + "tags": [] + }, + "source": [ + "# <font color='blue'>**Ãœbersicht - UML**</font>\n", + "\n", + "Die UML als im Wesentlichen graphische Notation stellt verschiedene Diagrammarten für die verschiedenen Modellierungsanforderungen zur Verfügung:\n", + "* **funktionale Zusammenhänge:**\n", + " * Use-Case-Diagramm\n", + "* **statische Strukturen:**\n", + " * Klassendiagramme, Objektdiagramme, Komponentendiagramme und Verteilungsdiagramme\n", + "* **dynamische strukturen:**\n", + " * Sequenzdiagramme, Kollaborationsdiagramme, Zustandsdiagramme und Aktivitätsdiagramme" + ] + }, + { + "cell_type": "markdown", + "id": "f6012101-a726-4880-8bbc-ccfee49d9ceb", + "metadata": {}, + "source": [ + "# <font color='blue'>**Wichtige Diagrammarten**</font>" + ] + }, + { + "cell_type": "markdown", + "id": "d2137a50-ff4c-4135-9e56-ca3e30cc02bd", + "metadata": {}, + "source": [ + "## **<font color='blue'>Klassendiagramm</font>** \n", + "\n", + "Ein Klassendiagramm ist ein Strukturdiagramm zur statischen Modellierung bzw. Repräsenation von Klassen, Schnittstellen sowie deren Beziehungen." + ] + }, + { + "cell_type": "markdown", + "id": "e7ac2738-e0bb-4c7f-a03f-10fa7ec5b71e", + "metadata": { + "tags": [] + }, + "source": [ + "### **<font color='blue'>Klasse</font>** \n", + "\n", + "**Definition:** \n", + "* Eine Klasse ist ein Schema von Objekten, in der die Eigenschaften, d.h. Attribute und Operationen definiert werden. Alle Objekte einer Klasse entsprechen dieser\n", + "Festlegung. \n", + "* Objekte sind Instanzen mit konkretem Namen und konkreten Attributen.\n", + "\n", + "**Notation:** \n", + "* Klassen/Objekte werden als Rechtecke mit den Namen (üblicherweise im Singular und mit Großschrift) der Klasse dargestellt. \n", + "* Gegebenenfalls werden die Attribute und/oder die Methoden, getrennt durch horizontale Linien, hinzugefügt. \n", + "* Attribute können näher beschrieben werden, z.B. durch Typ, einen Initialwert und Zusicherungen (Zusatzbedingungen). \n", + "* Methoden können durch Parameter, Initialwerte, Zusicherungen usw. beschrieben werden. \n", + "* Sichtbarkeiten von Attributen und Methoden werden durch ein Präfix (+#-/) codiert:\n", + "\n", + "| Attribute | Methoden |\n", + "| --- | --- |\n", + "| klassenAttribut | klassenOperation() |\n", + "| +publicAttribut | +publicOperation() | \n", + "| #protectedAttribut | #protectedOperation() | \n", + "| -privateAttribut | -privateOperation() | \n", + "| /abgeleitetesAttribut | |" + ] + }, + { + "cell_type": "markdown", + "id": "02a8c714-34c9-4f13-a280-984c5d54decb", + "metadata": { + "tags": [] + }, + "source": [ + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "97a85106-b815-4d8b-bc87-ecd93aae5312", + "metadata": {}, + "source": [ + "### **<font color='blue'>Assoziation</font>**\n", + "\n", + "**Definition:** \n", + "* Eine Assoziation beschreibt als Relation zwischen Klassen die gemeinsame Semantik und Struktur einer Menge von Objektverbindungen. \n", + "* Die Multiplizität (synonym Kardinalität) gibt an, mit wieviel Objekten der gegenüberliegenden Klasse ein Objekt assoziiert sein kann. \n", + "* Auf jeder Seite der Assoziation können Rollennamen vergeben werden. Diese beschreiben, welche Rolle die jeweiligen Objekte in der Beziehung einnehmen.\n", + "* Spezielle Varianten sind die Aggregation und die Komposition (s.u.).\n", + "\n", + "**Notation:** \n", + "* Eine Assoziation wird durch eine Linie zwischen den beteiligten Klassen dargestellt. \n", + "* Ein (kursiv gesetzter) Name beschreibt, worin und warum diese Beziehung besteht. \n", + "* Optional sind Zusicherungen oder Merkmale, die in geschweifte Klammern gesetzt werden.\n", + "* Ein kleines ausgefülltes Dreieck kann eingesetzt werden, um die Leserichtung zu kennzeichnen. \n", + "* Beispiele für Multiplizitätsangaben sind: ’1’ genau eins, ’0, 1’ null oder eins, ’0..4’ zwischen null und vier oder ’0..*’ größer oder gleich null.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "b76bad35-81ba-470a-9163-d88ed4f39d6f", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "123b16d9-ea69-43c7-b298-c09d6f69a65a", + "metadata": { + "tags": [] + }, + "source": [ + "### **<font color='blue'>Aggregation</font>**\n", + "\n", + "**Definition:** \n", + "* Eine Aggregation ist eine Assoziation, deren beteiligte Klassen eine **Ganzes-Teile-Hierarchie** darstellen. Eine Aggregation ist die Zusammensetzung eines Objektes aus\n", + "einer Menge von Einzelteilen. Das Ganze nimmt stellvertretend für seine Teile Aufgaben wahr. \n", + "Die Aggregatklasse kann Operationen enthalten, die keine unmittelbare Wirkung\n", + "im Aggregat selbst erzeugen, sondern die entsprechenden Nachrichten an seine Teile\n", + "weiterleiten.\n", + "\n", + "**Notation:**\n", + "* Eine Linie zwischen zwei Klassen mit einer Raute auf der Seite des Aggregats (des Ganzen) wird zur Darstellung der Aggregation verwendet. \n", + "* Die Kardinalitätsangabe auf der Seite des Aggregats ist häufig 1, so dass ein Fehlen der Angabe standardmäßig als 1 interpretiert wird.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "8c0c8c20-7f1f-4a6f-bc6e-2bd99a385f22", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "940142ad-0f52-43a9-b2fc-a9fc5f73aab0", + "metadata": { + "tags": [] + }, + "source": [ + "### **<font color='blue'>Komposition</font>**\n", + "\n", + "**Definition:** \n", + "* Eine Komposition ist eine strenge Form der Aggregation, bei der die Teile vom Ganzen **existenzabhängig** sind. \n", + "Im Unterschied zur Aggregation ist die Kardinalität auf der Aggregatseite 1, d.h. jedes Teil ist von nur genau einem Kompositionsobjekt abhängig und die Lebenszeit der Einzelteile der des Ganzen untergeordnet.\n", + "\n", + "\n", + "**Notation:**\n", + "* Wie bei der Aggregation wird eine Linie zwischen zwei Klassen jedoch mit einer ausgefüllten Raute auf der Seite des Aggregates verwendet. \n", + "* Kompositionsbeziehungen können mit einer Multiplizitätsangabe, mit einem Beziehungsnamen und mit Rollennamen notiert werden. \n", + "* Mehrere Kompositionsbeziehungen zu einem Ganzen können baumartig zusammengefasst werden.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "2316751c-4261-4ba2-b8dd-88671dcb41b1", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "799a4b32-983c-4a25-ace6-0b8038058ead", + "metadata": { + "tags": [] + }, + "source": [ + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "41aafc4c-697d-4646-b9f7-529815dec18b", + "metadata": {}, + "source": [ + "### **<font color='blue'>Vererbung</font>**\n", + "\n", + "**Definition:** \n", + "* Vererbung ist ein Konzept für die Relation zwischen Oberklasse und Unterklasse, wodurch Attribute und Operationen der Oberklasse auch den Unterklassen zugänglich werden. \n", + "* Generalisierung und Spezialisierung sind die entsprechenden Abstraktionsprinzipien zur hierarchischen Gliederung der Semantik eines Modells.\n", + "\n", + "\n", + "**Notation:**\n", + "* Die Assoziationslinie wird mit einem **nicht ausgefüllten Pfeil**, der von der Unterklasse zur Oberklasse zeigt, ergänzt. \n", + "* Die Pfeile von den Unterklassen können zu einer gemeinsamen Linie zusammengefasst werden. \n", + "* Eventuell kann eine Angabe des Unterscheidungsmerkmals zwischen Ober- und Unterklasse (Diskriminator) angegeben werden.\n" + ] + }, + { + "cell_type": "markdown", + "id": "f5229609-eb79-4923-b13d-59dada03db6d", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "897e545e-8339-4ad2-a0d7-ebd77d28b83d", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Aktivitätsdiagramm</font>** \n", + "\n", + "**Definition:**\n", + "* In einem Aktivitätsdiagramm werden die Objekte eines Programms mittels der Aktivitäten, die sie während des **Programmablaufs** vollführen, beschrieben. \n", + "* Eine Aktivität ist ein einzelner Schritt innerhalb eines Programmablaufes, d.h. ein spezieller Zustand eines Modellelementes, eine interne Aktion sowie eine oder mehrere von ihm ausgehende Transitionen (Ãœbergang von einer Aktivität zur nächsten). \n", + "* Ein Aktivitätsdiagramm ähnelt einem **Flussdiagramm**. \n", + "* Jedoch sind alle Aktivitäten eindeutig **Objekten** zugeordnet, d.h. sie sind entweder einer Klasse, Operation/Methode oder Use-Case eindeutig untergeordnet.\n", + "* Sie dienen auch der Synchronisation von parallelen Prozessen\n", + "\n", + "**Notation:**\n", + "* Eine Aktivität wird durch ein **Rechteck mit konvex abgerundeten Seiten** dargestellt. Sie enthält eine Beschreibung der internen Aktion. \n", + "* Von der Aktivität aus gehen die **Transitionen**, die den Abschluss der internen Aktion und den Ãœbergang zur nächsten Aktivität darstellen. \n", + "* Rauten kennzeichnen Verzweigungen mit entsprechenden Bedingungen an den Transitionspfeilen. \n", + "* Start- und Endpunkte werden als runde Punkte dargestellt. \n", + "* Das Aufspalten und Synchronisieren paralleler Prozesse wird jeweils durch einen Balken kennzeichnet.\n" + ] + }, + { + "cell_type": "markdown", + "id": "cd56ec1a-68d5-4b63-8f9a-f1921261b8cf", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "abaf4875-2c26-4f44-86bb-b8f1cd5973c1", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Kollaborationsdiagramm</font>** \n", + "\n", + "**Definition:**\n", + "* Es dient der Darstellung der Objekt-Interaktionen für einen bestimmten **begrenzten Kontext** unter besonderer Beachtung der Beziehungen unter den einzelnen Objekten und ihrer Topographie. \n", + "* Der zeitliche Verlauf der Interaktionen wird durch eine Nummerierung der Nachrichten symbolisiert.\n", + "\n", + "\n", + "**Notation:**\n", + "* Für die Objekte werden Rechtecke eingesetzt. \n", + "* Die Objektverbindungen werden durch Assoziationslinien gekennzeichnet, an die die Nachrichten mit Ihrem Namen, Antworten und möglichen Argumenten angetragen werden. \n", + "* Ein Pfeil zeigt die Richtung der Nachricht vom Sender zum Empfänger. \n", + "* Die Startnachricht bekommt keine Nummerierung. \n", + "* Eine Unternummerierung erfolgt, falls neue Nachrichten innerhalb der Nachrichten-Interpretation verschickt werden. Mehrfachnachrichten werden mit Sternchen * markiert.\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "0fd3d184-781b-470a-b3f8-48714f06a830", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "4cbd8a4e-8966-4247-af7e-586c7541250b", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "e948e446-f21b-4bf7-86dd-8f2a5cc51088", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Sequenzdiagramm</font>** \n", + "\n", + "**Definition:**\n", + "* Das Sequenzdiagramm beschreibt die **zeitliche Abfolge** von Interaktionen zwischen einer Menge von Objekten innerhalb eines **zeitlich begrenzten Kontextes**.\n", + "\n", + "**Notation:**\n", + "* Wieder werden **Rechtecke für Objekte** verwendet, von denen **senkrechte, gestrichelte Lebenslinien** ausgehen. \n", + "* **Aktive Objekte** werden durch einen **Balken** auf der Lebenslinie gekennzeichent. \n", + "* Nachrichten werden durch **waagerechte Pfeile** zwischen den Objektlebenslinien dargestellt. Sie erhalten einen Namen, der durch eine Antwort und gegebenenfalls durch eine Bedingung in Rechteckklammern ergänzt werden kann.\n", + "* Iterationen werden durch einen Stern * kenntlich gemacht. \n", + "* Objekte können während des Ablaufes erzeugt werden, indem ein Pfeil mit der Aufschrift neu() auf ein neues Objektsymbol trifft, und gelöscht werden, indem seine Lebenslinie in einem Kreuz endet.\n" + ] + }, + { + "cell_type": "markdown", + "id": "24541194-17ce-4283-9ac1-73ac0c1eb7b5", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "2dc75441-4a7d-49d4-99ee-2eeaadd972a3", + "metadata": { + "tags": [] + }, + "source": [ + "## **<font color='blue'>Anwendungsfalldiagramm</font>** \n", + "\n", + "**Definition:**\n", + "* Es dient der ersten **Strukturierung der Anforderungen** und **Verantwortlichkeiten**. \n", + "* Dargestellt werden die Interaktion mit dem Software-System aus **Sicht der Benutzer**, die hier die Rolle von sogenannten **Akteuren** annehmen. \n", + "* Ziel ist eine erste Strukturierung durch die saubere Trennung der möglichen Anwendungsfälle. \n", + "* Die relativ einfachen Diagramme können durch textuelle Erläuterungen, wie z.B. Vor- und Nachbedingungen für die Prozesse, ergänzt werden und sind dann Bestandteil des Lastenhefts.\n", + "\n", + "**Notation:**\n", + "* Anwendungsfälle werden durch Ellipsen und einer Menge von beteiligten Objekten (Akteuren) dargestellt (Abbildung 56). \n", + "* Zu jedem Anwendungsfall gibt es eine Beschreibung in Textform. \n", + "* Die entsprechenden Anwendungsfälle und Akteure sind durch Linien miteinander verbunden. \n", + "* Die Systemgrenze wird durch einen Rahmen um die Anwendungsfälle symbolisiert. \n", + "* Ergänzt werden kann das Diagramm durch Rechtecke mit einer umgeknickten Ecke mit erläuternden Notizen (Annotationen).\n" + ] + }, + { + "cell_type": "markdown", + "id": "8b39e5bb-3917-4e4e-8fa6-83cc08ec7849", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + } + ], + "metadata": { + "@deathbeds/ipydrawio": { + "xml": "" + }, + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Semester_2/Einheit_01/Uebung_1.ipynb b/Semester_2/Einheit_01/Uebung_1.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..ff1c2c41e58313cf4985cec212383295bfe046c3 --- /dev/null +++ b/Semester_2/Einheit_01/Uebung_1.ipynb @@ -0,0 +1,261 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "6761a365", + "metadata": {}, + "source": [ + "# <font color='blue'>**Ãœbung 1 - Anwendung von Datenstrukturen**</font>\n", + "## <font color='blue'>**Problemstellung: Auswertung von Klammerausdrücken (Stack)**</font>\n", + "### <font color='blue'>**Problembeschreibung**</font>\n", + "\n", + "Die Reihenfolge von Rechenoperationen wird mithilfe von Klammern bestimmt. Es soll ein Skript entwickelt werden, das in der Lage ist, eine Zeichenkette wie zum Beispiel ````\"(((35+7)*(5-3))/2)\"```` auszuwerten und das Ergebnis zu ermitteln. Um eine kompakte Programmierung zu ermöglichen, gelten dabei für die Zeichenkette die folgende Anforderungen:\n", + "* Jede Operation muss umklammert werden. Folglich sind Eingaben wie ````1+2+3```` oder ````1-3*5```` nicht möglich. Es muss ````((1+2)+3)```` oder ````(1-(3*5))```` eingegeben werden.\n", + "* Verfügbare Operatoren sollen ````+````,````-````,````*````, und ````/```` sein.\n", + "* Gleitkommazahlen mit ````.```` sollen unterstützt werden.\n", + "* Negative Zahlen werden nicht unterstützt.\n", + "\n", + "### <font color='blue'>**Modellbildung**</font>\n", + "\n", + "Die Operatoren werden entsprechend ihrer mathematischen Definition in der von den Klammern vorgegebenen Reihenfolge ausgewertet.\n", + "\n", + "### <font color='blue'>**Algorithmierung**</font>\n", + "\n", + "Stacks sind eine geeignete Datenstruktur, um solche Klammerausdrücke auszuwerten. Das grundsätzliche Vorgehen ist, dass die Zeichenkette von vorne nach hinten durchlaufen wird, und dabei zwei Stacks (Operanden und Operatoren) gefüllt werden (`push`). Bei jeder schließenden Klammer, wird die neueste Operation ausgewertet und dabei ein Operator und zwei Operanden von den Stacks entfernt (`pop`). Das Ergebnis wird dem Operandenstack hinzufügt (`push`).<br>\n", + "<br>\n", + "Dieses Verfahren lässt sich gut an einem Beispiel zeigen:<br>\n", + "<br>\n", + ">Zeichenkette: ````(1-(3*5))````.<br>\n", + "><br>\n", + ">Bis zur ersten schließenden Klammer werden die Zahlen und die Operatoren in die Stacks hinzugefügt. Die Stacks haben dann folgenden Inhalt:<br>\n", + ">Operanden: `[ 1, 3, 5 ]`<br>\n", + ">Operatoren: `[ -, * ]`<br>\n", + "><br>\n", + ">Bei der ersten schließenden Klammer werden nun der Operator ````*```` und die Operanden ````5, 3```` aus den Stacks geholt. Die Operation ````3*5```` wird berechnet und das Ergebnis (````15````) dem Operandenstack hinzugefügt.<br>\n", + "><br>\n", + ">Die beiden Stacks sind dann folgendermaßen gefüllt:<br>\n", + ">Operanden: `[ 1, 15 ]`<br>\n", + ">Operatoren: `[ - ]`<br>\n", + "<br>\n", + ">Es folgt eine weitere schließende Klammer und die nächste Operation ````1-15```` wird aus den Stacks geholt und berechnet. Das Ergebnis ````-14```` wird in den Operandenstack geschrieben. Der Operatorstack ist leer und die Zeichenkette ist vollständig durchlaufen. Das Ergebnis ist der Eintrag im Operandenstack: ````-14````\n", + "\n", + "Dieses Vorgehen werden wir in der Methode ````auswerten(ausdruck)```` implementieren.\n", + "\n", + "Wir erstellen eine Klasse ````AusdruckAuswerter````, um die benötigten Daten und Methoden zu gruppieren. Da die Klasse zwei Stacks als Attribute hat, benötigen wir zusätzlich eine Klasse ````Stack````. Diese ist allgemein und wir leiten sie in zwei Varianten ab. Diese verändern die Push-Methode, sodass ````OperatorStack```` nur das Speichern von Operatoren erlaubt und ```` OperandenStack```` die Eingaben direkt von Zeichen zu Zahlen konvertiert. \n", + "\n", + "Die vollständige Klassenstruktur ist hier im UML Diagramm gezeigt: " + ] + }, + { + "cell_type": "markdown", + "id": "0b489c77", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "42dd5113", + "metadata": {}, + "source": [ + "Die Klasse `AusdruckAuswerter` speichert neben den Stacks noch Listen für die verschiedenen Zeichentypen. Zudem wird das Attribut `zahl` verwendet, um Zahlen mit mehr als einer Ziffer auswerten zu können. Neben der zentralen `auswerten()`-Methode sind das Berechnen der aktuellen Operation und das Zwischenspeichern von Zahlen mit mehreren Ziffern ausgelagert.\n", + "\n", + "Um Zahlen mit mehr als einem Zeichen einlesen zu können, wird beim Durchgehen der Zeichenkette ein als Zahl erkanntes Zeichen nicht direkt dem Stack hinzugefügt, sondern zunächst der Zeichenkette ````zahl```` hinzugefügt. Sobald ein eingelesenes Zeichen keine Zahl (oder Dezimalpunkt) ist und etwas in ````zahl```` eingetragen ist, dann wird ````zahl```` dem Stack hinzugefügt und anschließend zurückgesetzt. Dieses Prüfen, Eintragen und Zurücksetzen wird von der Methode ````push_zahl()```` übernommen. Sie wird aufgerufen, wenn das aktuelle Zeichen keine Ziffer ist." + ] + }, + { + "cell_type": "markdown", + "id": "e7768d99", + "metadata": {}, + "source": [ + "In der Methode ````auswerten()```` wird über alle Zeichen in der Zeichenkette iteriert. Je nach Zeichen werden folgende Schritte ausgeführt: \n", + "* ````(````: keine Aktion\n", + "* Operator: `push_zahl()` und Operator dem Stack hinzufügen\n", + "* Zahl oder Dezimalpunkt: Zeichen `zahl` hinzufügen\n", + "* `)`: `push_zahl()` und Operation auswerten\n", + "* Anderes: Ausgabe \"unerwartetes Zeichen\"\n", + "\n", + "Nach dem letzten Zeichen gibt die Methode die neueste Zahl des Operandenstacks zurück. Wenn die ausgewerte Zeichenkette den oben genannten Bedingungen entspricht, ist dies der einzige Eintrag.\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "3c3e484e", + "metadata": {}, + "source": [ + "In der Methode ````berechne_operation()```` wird zunächst der Operator vom Operatorstack geholt. Anschließend werden die Zahlen (Operanden) vom Operandenstack geholt. Je nach Operator wird das Ergebnis der Operation dem Operandenstack hinzugefügt. Bei der Berechnung muss darauf geachtet werden, dass der zuerst ausgelesene Operand derjenige hinter dem Operator ist (relevant für \"-\" und \"/\")." + ] + }, + { + "cell_type": "markdown", + "id": "c9cfb189", + "metadata": {}, + "source": [ + "### <font color='blue'>**Umsetzung**</font>\n", + "\n", + "Stack-Klassen:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "462ef289", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "class Stack:\n", + " def __init__(self):\n", + " self.stack = list()\n", + " \n", + " def push(self, element):\n", + " self.stack.\"?\"(\"?\")\n", + " \n", + " def pop(self):\n", + " element = \"?\"\n", + " self.stack = \"?\"\n", + " return \"?\"\n", + " \n", + " def peek(self):\n", + " return \"?\"\n", + " \n", + " def __len__(self):\n", + " return \"?\"\n", + " \n", + "class OperatorStack(\"?\"):\n", + " def push(self, element):\n", + " if \"?\":\n", + " \"?\"\n", + " else:\n", + " print( f\"Operator '{element}' nicht verfügbar.\" )\n", + "\n", + "class \"?\":\n", + " \"?\"" + ] + }, + { + "cell_type": "markdown", + "id": "381d6edc", + "metadata": {}, + "source": [ + "Klasse `AusdruckAuswerter`:" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "3878a0fd", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "class AusdruckAuswerter:\n", + " def __init__(self):\n", + " self.op_stack = OperatorStack()\n", + " self.zahl_stack = OperandenStack()\n", + " \n", + " self.operatoren = \"+-*/\"\n", + " self.ziffern = \"0123456789.\"\n", + " self.zahl = \"\"\n", + " \n", + " def auswerten(self, ausdruck):\n", + " \"?\"\n", + " \n", + " def push_zahl(self):\n", + " if len(self.zahl)>0:\n", + " self.zahl_stack.push(float(self.zahl))\n", + " self.zahl = \"\"\n", + " \n", + " def berechne_operation(self):\n", + " \"?\"\n" + ] + }, + { + "cell_type": "markdown", + "id": "065630f0", + "metadata": {}, + "source": [ + "Test der Ausdruck-Auswertung (der Ausdruck darf gerne variiert werden):" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "6f505456", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-14.0\n", + "2.0\n" + ] + } + ], + "source": [ + "testauswerter = AusdruckAuswerter()\n", + "print( testauswerter.auswerten(\"(1-(3*5))\") )\n", + "print( testauswerter.auswerten(\"(20/(2*5))\") )" + ] + }, + { + "cell_type": "markdown", + "id": "2b49b5cf", + "metadata": {}, + "source": [ + "### <font color='blue'>**Anregungen zum selbst Programmieren**</font>\n", + "\n", + "* Erstelle eine Datenstruktur zur Verwaltung einer Warteschlange für eine CNC-Maschine. Verwende dazu 3 Klassen: \n", + " \n", + " * die allgemeine `Datenstruktur`, die `Maschine`, und den `Auftrag`. \n", + " \n", + " * Eine `Maschine` soll eine Datenstruktur für die Warteschlange beinhalten und Methoden, um Aufträge der Schlange hinzuzufügen und den nächsten Auftrag zu bearbeiten. \n", + " Zudem soll es eine Methode geben, die dafür sorgt, dass alle verbleibenden Aufträge abgearbeitet werden. \n", + " Bei der Bearbeitung soll die Maschine die Informationen über den bearbeiteten Auftrag ausgeben. \n", + " \n", + " * Ein `Auftrag` hat folgende Daten:\n", + " * `Name`\n", + " * `Stückzahl`\n", + " * `Materialart`\n", + " * `Materialmenge pro Stück`\n", + " * `Dauer pro Stück`<br>\n", + " * Die `__init()__`- Methode soll prüfen, dass bei den Zahlenwerten nur positive Werte eingegeben werden.\n", + " \n", + " <br><br>\n", + "\n", + "* **Anspruchsvoll:** Erweitere das in dieser Ãœbung behandelte Programm so, dass nicht zwingend alle Operationen umklammert werden müssen, und dass Punkt- vor Strichrechnung umgesetzt wird. Um das bestehende Programm weiterverwenden zu können, ist ein möglicher Ansatz, eine Methode zu erstellen, die die Zeichenkette anhand der Regeln \"Punkt- vor Strichrechnung\" und \"von links nach rechts\" mit Klammern ergänzt. " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/Semester_2/Einheit_01/Uebung_1_Lsg.ipynb b/Semester_2/Einheit_01/Uebung_1_Lsg.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..5cafb15426b28269c0a5f7ef26ee005540cd62f4 --- /dev/null +++ b/Semester_2/Einheit_01/Uebung_1_Lsg.ipynb @@ -0,0 +1,290 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "6761a365", + "metadata": {}, + "source": [ + "# <font color='blue'>**Ãœbung 1 - Anwendung von Datenstrukturen**</font>\n", + "## <font color='blue'>**Problemstellung: Auswertung von Klammerausdrücken (Stack)**</font>\n", + "### <font color='blue'>**Problembeschreibung**</font>\n", + "\n", + "Die Reihenfolge von Rechenoperationen wird mithilfe von Klammern bestimmt. Es soll ein Skript entwickelt werden, das in der Lage ist, eine Zeichenkette wie zum Beispiel ````\"(((35+7)*(5-3))/2)\"```` auszuwerten und das Ergebnis zu ermitteln. Um eine kompakte Programmierung zu ermöglichen, gelten dabei für die Zeichenkette die folgende Anforderungen:\n", + "* Jede Operation muss umklammert werden. Folglich sind Eingaben wie ````1+2+3```` oder ````1-3*5```` nicht möglich. Es muss ````((1+2)+3)```` oder ````(1-(3*5))```` eingegeben werden.\n", + "* Verfügbare Operatoren sollen ````+````,````-````,````*````, und ````/```` sein.\n", + "* Gleitkommazahlen mit ````.```` sollen unterstützt werden.\n", + "* Negative Zahlen werden nicht unterstützt.\n", + "\n", + "### <font color='blue'>**Modellbildung**</font>\n", + "\n", + "Die Operatoren werden entsprechend ihrer mathematischen Definition in der von den Klammern vorgegebenen Reihenfolge ausgewertet.\n", + "\n", + "### <font color='blue'>**Algorithmierung**</font>\n", + "\n", + "Stacks sind eine geeignete Datenstruktur, um solche Klammerausdrücke auszuwerten. Das grundsätzliche Vorgehen ist, dass die Zeichenkette von vorne nach hinten durchlaufen wird, und dabei zwei Stacks (Operanden und Operatoren) gefüllt werden (`push`). Bei jeder schließenden Klammer, wird die neueste Operation ausgewertet und dabei ein Operator und zwei Operanden von den Stacks entfernt (`pop`). Das Ergebnis wird dem Operandenstack hinzufügt (`push`).<br>\n", + "<br>\n", + "Dieses Verfahren lässt sich gut an einem Beispiel zeigen:<br>\n", + "<br>\n", + ">Zeichenkette: ````(1-(3*5))````.<br>\n", + "><br>\n", + ">Bis zur ersten schließenden Klammer werden die Zahlen und die Operatoren in die Stacks hinzugefügt. Die Stacks haben dann folgenden Inhalt:<br>\n", + ">Operanden: `[ 1, 3, 5 ]`<br>\n", + ">Operatoren: `[ -, * ]`<br>\n", + "><br>\n", + ">Bei der ersten schließenden Klammer werden nun der Operator ````*```` und die Operanden ````5, 3```` aus den Stacks geholt. Die Operation ````3*5```` wird berechnet und das Ergebnis (````15````) dem Operandenstack hinzugefügt.<br>\n", + "><br>\n", + ">Die beiden Stacks sind dann folgendermaßen gefüllt:<br>\n", + ">Operanden: `[ 1, 15 ]`<br>\n", + ">Operatoren: `[ - ]`<br>\n", + "<br>\n", + ">Es folgt eine weitere schließende Klammer und die nächste Operation ````1-15```` wird aus den Stacks geholt und berechnet. Das Ergebnis ````-14```` wird in den Operandenstack geschrieben. Der Operatorstack ist leer und die Zeichenkette ist vollständig durchlaufen. Das Ergebnis ist der Eintrag im Operandenstack: ````-14````\n", + "\n", + "Dieses Vorgehen werden wir in der Methode ````auswerten(ausdruck)```` implementieren.\n", + "\n", + "Wir erstellen eine Klasse ````AusdruckAuswerter````, um die benötigten Daten und Methoden zu gruppieren. Da die Klasse zwei Stacks als Attribute hat, benötigen wir zusätzlich eine Klasse ````Stack````. Diese ist allgemein und wir leiten sie in zwei Varianten ab. Diese verändern die Push-Methode, sodass ````OperatorStack```` nur das Speichern von Operatoren erlaubt und ```` OperandenStack```` die Eingaben direkt von Zeichen zu Zahlen konvertiert. \n", + "\n", + "Die vollständige Klassenstruktur ist hier im UML Diagramm gezeigt: " + ] + }, + { + "cell_type": "markdown", + "id": "0b489c77", + "metadata": { + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "42dd5113", + "metadata": {}, + "source": [ + "Die Klasse `AusdruckAuswerter` speichert neben den Stacks noch Listen für die verschiedenen Zeichentypen. Zudem wird das Attribut `zahl` verwendet, um Zahlen mit mehr als einer Ziffer auswerten zu können. Neben der zentralen `auswerten()`-Methode sind das Berechnen der aktuellen Operation und das Zwischenspeichern von Zahlen mit mehreren Ziffern ausgelagert.\n", + "\n", + "Um Zahlen mit mehr als einem Zeichen einlesen zu können, wird beim Durchgehen der Zeichenkette ein als Zahl erkanntes Zeichen nicht direkt dem Stack hinzugefügt, sondern zunächst der Zeichenkette ````zahl```` hinzugefügt. Sobald ein eingelesenes Zeichen keine Zahl (oder Dezimalpunkt) ist und etwas in ````zahl```` eingetragen ist, dann wird ````zahl```` dem Stack hinzugefügt und anschließend zurückgesetzt. Dieses Prüfen, Eintragen und Zurücksetzen wird von der Methode ````push_zahl()```` übernommen. Sie wird aufgerufen, wenn das aktuelle Zeichen keine Ziffer ist." + ] + }, + { + "cell_type": "markdown", + "id": "e7768d99", + "metadata": {}, + "source": [ + "In der Methode ````auswerten()```` wird über alle Zeichen in der Zeichenkette iteriert. Je nach Zeichen werden folgende Schritte ausgeführt: \n", + "* ````(````: keine Aktion\n", + "* Operator: `push_zahl()` und Operator dem Stack hinzufügen\n", + "* Zahl oder Dezimalpunkt: Zeichen `zahl` hinzufügen\n", + "* `)`: `push_zahl()` und Operation auswerten\n", + "* Anderes: Ausgabe \"unerwartetes Zeichen\"\n", + "\n", + "Nach dem letzten Zeichen gibt die Methode die neueste Zahl des Operandenstacks zurück. Wenn die ausgewerte Zeichenkette den oben genannten Bedingungen entspricht, ist dies der einzige Eintrag.\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "id": "3c3e484e", + "metadata": {}, + "source": [ + "In der Methode ````berechne_operation()```` wird zunächst der Operator vom Operatorstack geholt. Anschließend werden die Zahlen (Operanden) vom Operandenstack geholt. Je nach Operator wird das Ergebnis der Operation dem Operandenstack hinzugefügt. Bei der Berechnung muss darauf geachtet werden, dass der zuerst ausgelesene Operand derjenige hinter dem Operator ist (relevant für \"-\" und \"/\")." + ] + }, + { + "cell_type": "markdown", + "id": "c9cfb189", + "metadata": {}, + "source": [ + "### <font color='blue'>**Umsetzung**</font>\n", + "\n", + "Stack-Klassen:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "462ef289", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "class Stack:\n", + " def __init__(self):\n", + " self.stack = list()\n", + " \n", + " def push(self, element):\n", + " self.stack.append(element)\n", + " \n", + " def pop(self):\n", + " element = self.stack[-1]\n", + " self.stack = self.stack[:-1]\n", + " return element\n", + " #return self.stack.pop()\n", + " \n", + " def peek(self):\n", + " return self.stack[-1]\n", + " \n", + " def __len__(self):\n", + " return len(self.stack)\n", + " \n", + "class OperatorStack(Stack):\n", + " def push(self, element):\n", + " if len(element) == 1 and element in \"+-*/\":\n", + " self.stack.append(element)\n", + " else:\n", + " print( f\"Operator '{element}' nicht verfügbar.\" )\n", + "\n", + "class OperandenStack(Stack):\n", + " def push(self, element):\n", + " self.stack.append( float(element) )" + ] + }, + { + "cell_type": "markdown", + "id": "381d6edc", + "metadata": {}, + "source": [ + "Klasse `AusdruckAuswerter`:" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "3878a0fd", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "class AusdruckAuswerter:\n", + " def __init__(self):\n", + " self.op_stack = OperatorStack()\n", + " self.zahl_stack = OperandenStack()\n", + " \n", + " self.operatoren = \"+-*/\"\n", + " self.ziffern = \"0123456789.\"\n", + " self.zahl = \"\"\n", + " \n", + " def auswerten(self, ausdruck):\n", + " for zeichen in ausdruck:\n", + " if zeichen ==\"(\":\n", + " continue\n", + " elif zeichen in self.operatoren:\n", + " self.push_zahl()\n", + " self.op_stack.push(zeichen)\n", + " elif zeichen in self.ziffern:\n", + " self.zahl += zeichen\n", + " elif zeichen == \")\":\n", + " self.push_zahl()\n", + " self.berechne_operation_eval()\n", + " else:\n", + " print(\"Ungültiges Zeichen \"+ zeichen)\n", + " \n", + " return self.zahl_stack.pop()\n", + " \n", + " def push_zahl(self):\n", + " if len(self.zahl)>0:\n", + " self.zahl_stack.push(float(self.zahl))\n", + " self.zahl = \"\"\n", + " \n", + " def berechne_operation(self):\n", + " operator_str = self.op_stack.pop()\n", + " if operator_str == '+':\n", + " self.zahl_stack.push(self.zahl_stack.pop()+self.zahl_stack.pop())\n", + " elif operator_str == '-':\n", + " self.zahl_stack.push(-self.zahl_stack.pop()+self.zahl_stack.pop())\n", + " elif operator_str == '*':\n", + " self.zahl_stack.push(self.zahl_stack.pop()*self.zahl_stack.pop())\n", + " else:\n", + " self.zahl_stack.push((1/self.zahl_stack.pop())*self.zahl_stack.pop())\n", + " \n", + " def berechne_operation_eval(self):\n", + " operation = self.op_stack.pop() + str(self.zahl_stack.pop())\n", + " operation = str(self.zahl_stack.pop()) + operation\n", + " self.zahl_stack.push( eval(operation) ) " + ] + }, + { + "cell_type": "markdown", + "id": "065630f0", + "metadata": {}, + "source": [ + "Test der Ausdruck-Auswertung (der Ausdruck darf gerne variiert werden):" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "id": "6f505456", + "metadata": { + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "-14.0\n", + "2.0\n" + ] + } + ], + "source": [ + "testauswerter = AusdruckAuswerter()\n", + "print( testauswerter.auswerten(\"(1-(3*5))\") )\n", + "print( testauswerter.auswerten(\"(20/(2*5))\") )" + ] + }, + { + "cell_type": "markdown", + "id": "2b49b5cf", + "metadata": {}, + "source": [ + "### <font color='blue'>**Anregungen zum selbst Programmieren**</font>\n", + "\n", + "* Erstelle eine Datenstruktur zur Verwaltung einer Warteschlange für eine CNC-Maschine. Verwende dazu 3 Klassen: \n", + " \n", + " * die allgemeine `Datenstruktur`, die `Maschine`, und den `Auftrag`. \n", + " \n", + " * Eine `Maschine` soll eine Datenstruktur für die Warteschlange beinhalten und Methoden, um Aufträge der Schlange hinzuzufügen und den nächsten Auftrag zu bearbeiten. \n", + " Zudem soll es eine Methode geben, die dafür sorgt, dass alle verbleibenden Aufträge abgearbeitet werden. \n", + " Bei der Bearbeitung soll die Maschine die Informationen über den bearbeiteten Auftrag ausgeben. \n", + " \n", + " * Ein `Auftrag` hat folgende Daten:\n", + " * `Name`\n", + " * `Stückzahl`\n", + " * `Materialart`\n", + " * `Materialmenge pro Stück`\n", + " * `Dauer pro Stück`<br>\n", + " * Die `__init()__`- Methode soll prüfen, dass bei den Zahlenwerten nur positive Werte eingegeben werden.\n", + " \n", + " <br><br>\n", + "\n", + "* **Anspruchsvoll:** Erweitere das in dieser Ãœbung behandelte Programm so, dass nicht zwingend alle Operationen umklammert werden müssen, und dass Punkt- vor Strichrechnung umgesetzt wird. Um das bestehende Programm weiterverwenden zu können, ist ein möglicher Ansatz, eine Methode zu erstellen, die die Zeichenkette anhand der Regeln \"Punkt- vor Strichrechnung\" und \"von links nach rechts\" mit Klammern ergänzt. " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}