diff --git a/SQL.sql b/SQL.sql
new file mode 100644
index 0000000..f5afb10
--- /dev/null
+++ b/SQL.sql
@@ -0,0 +1,11 @@
+CREATE DATABASE IF NOT EXISTS FahrzeugDB;
+GRANT ALL PRIVILEGES ON FahrzeugDB.* TO 'admin'@'%';
+FLUSH PRIVILEGES;
+USE FahrzeugDB;
+DROP TABLE IF EXISTS fahrzeuge;
+CREATE TABLE fahrzeuge (
+id INT NOT NULL AUTO_INCREMENT,
+fahrzeug_name VARCHAR(100) NOT NULL,
+fahrzeug_typ VARCHAR(100) NOT NULL,
+PRIMARY KEY ( id )
+);
\ No newline at end of file
diff --git a/SQLMan/App.xaml b/SQLMan/App.xaml
new file mode 100644
index 0000000..8d85095
--- /dev/null
+++ b/SQLMan/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/SQLMan/App.xaml.cs b/SQLMan/App.xaml.cs
new file mode 100644
index 0000000..41a352e
--- /dev/null
+++ b/SQLMan/App.xaml.cs
@@ -0,0 +1,14 @@
+using System.Configuration;
+using System.Data;
+using System.Windows;
+
+namespace SQLMan
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+
+}
diff --git a/SQLMan/AssemblyInfo.cs b/SQLMan/AssemblyInfo.cs
new file mode 100644
index 0000000..b0ec827
--- /dev/null
+++ b/SQLMan/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/SQLMan/MainWindow.xaml b/SQLMan/MainWindow.xaml
new file mode 100644
index 0000000..9445cb8
--- /dev/null
+++ b/SQLMan/MainWindow.xaml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SQLMan/MainWindow.xaml.cs b/SQLMan/MainWindow.xaml.cs
new file mode 100644
index 0000000..0448e14
--- /dev/null
+++ b/SQLMan/MainWindow.xaml.cs
@@ -0,0 +1,67 @@
+using Microsoft.Win32;
+using MySqlConnector;
+using System.IO;
+using System.Windows;
+
+namespace SQLMan;
+
+///
+/// Interaction logic for MainWindow.xaml.
+///
+public partial class MainWindow : Window
+{
+ public MainWindow()
+ {
+ InitializeComponent();
+ this.ConnectionTextBox.Text = "Server=localhost;User ID=root;Password=root";
+ }
+
+ private void SelectButonClick(object sender, RoutedEventArgs e)
+ {
+ FileInfo? datei = this.SkriptDateiWahlen();
+ string dateiInhalt = this.DateiEinlesen(datei);
+ this.SkriptTextBox.Text = dateiInhalt;
+ }
+
+ private FileInfo? SkriptDateiWahlen()
+ {
+ OpenFileDialog dateiDialog = new OpenFileDialog();
+ dateiDialog.Filter = "SQL files (*.sql)|*.sql";
+ if (dateiDialog.ShowDialog() == true)
+ {
+ return new FileInfo(dateiDialog.FileName);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private string DateiEinlesen(FileInfo? datei)
+ {
+ if (datei == null) return string.Empty;
+ string dateiInhalt = File.ReadAllText(datei.FullName);
+ return dateiInhalt;
+ }
+
+ private void ExecuteButonClick(object sender, RoutedEventArgs e)
+ {
+ try {
+ this.FuehreSkriptAus(this.SkriptTextBox.Text, this.ConnectionTextBox.Text);
+ MessageBox.Show("Das Skript wurde erfolgreich ausgeführt!");
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.Message);
+ }
+ }
+
+ private void FuehreSkriptAus(string sqlScript, string connectionString)
+ {
+ using var datenbankVerbindung = new MySqlConnection(connectionString);
+ datenbankVerbindung.Open();
+
+ using var kommando = new MySqlCommand(sqlScript, datenbankVerbindung);
+ kommando.ExecuteNonQuery();
+ }
+}
\ No newline at end of file
diff --git a/SQLMan/SQLMan.csproj b/SQLMan/SQLMan.csproj
new file mode 100644
index 0000000..0cc3805
--- /dev/null
+++ b/SQLMan/SQLMan.csproj
@@ -0,0 +1,15 @@
+
+
+
+ WinExe
+ net9.0-windows
+ enable
+ enable
+ true
+
+
+
+
+
+
+
diff --git a/Ubung.sln b/Ubung.sln
new file mode 100644
index 0000000..e2665ea
--- /dev/null
+++ b/Ubung.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35919.96
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ubung", "Ubung\Ubung.csproj", "{3E59EB27-0ACB-40D5-A428-577BBEE50BC9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLMan", "SQLMan\SQLMan.csproj", "{EBEED711-090F-4441-B51E-94F492E920D2}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3E59EB27-0ACB-40D5-A428-577BBEE50BC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E59EB27-0ACB-40D5-A428-577BBEE50BC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E59EB27-0ACB-40D5-A428-577BBEE50BC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E59EB27-0ACB-40D5-A428-577BBEE50BC9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EBEED711-090F-4441-B51E-94F492E920D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EBEED711-090F-4441-B51E-94F492E920D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EBEED711-090F-4441-B51E-94F492E920D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EBEED711-090F-4441-B51E-94F492E920D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {730247B2-661F-4AE3-878C-6D160EF22F7F}
+ EndGlobalSection
+EndGlobal
diff --git a/Ubung/Auto.cs b/Ubung/Auto.cs
new file mode 100644
index 0000000..2b2acc6
--- /dev/null
+++ b/Ubung/Auto.cs
@@ -0,0 +1,15 @@
+namespace Ubung;
+
+internal abstract class Auto
+{
+ protected Auto(int countDors)
+ {
+ this.CountDors = countDors;
+ }
+
+ public int CountDors { get; protected set; }
+
+ public string Color { get; set; } = "";
+
+ public string Type { get; set; } = "";
+}
diff --git a/Ubung/GenTec.cs b/Ubung/GenTec.cs
new file mode 100644
index 0000000..d351f13
--- /dev/null
+++ b/Ubung/GenTec.cs
@@ -0,0 +1,26 @@
+namespace Ubung;
+
+internal class GenTec
+{
+ private T[] values;
+
+ public GenTec(int groesse)
+ {
+ values = new T[groesse];
+ }
+
+ public T GetValue(int index)
+ {
+ return values[index];
+ }
+
+ public void SetValue(int index, T value)
+ {
+ values[index] = value;
+ }
+
+ public string GetType()
+ {
+ return typeof(T).Name;
+ }
+}
diff --git a/Ubung/GenTecList.cs b/Ubung/GenTecList.cs
new file mode 100644
index 0000000..7a642d9
--- /dev/null
+++ b/Ubung/GenTecList.cs
@@ -0,0 +1,21 @@
+namespace Ubung;
+
+internal class GenTecList
+{
+ List list = new List();
+
+ public T GetValue(int index)
+ {
+ return list[index];
+ }
+
+ public void AddValue(T value)
+ {
+ list.Add(value);
+ }
+
+ public string GetType()
+ {
+ return typeof(T).Name;
+ }
+}
diff --git a/Ubung/Kombi.cs b/Ubung/Kombi.cs
new file mode 100644
index 0000000..7c9914c
--- /dev/null
+++ b/Ubung/Kombi.cs
@@ -0,0 +1,8 @@
+namespace Ubung;
+
+internal class Kombi : Auto
+{
+ public Kombi() : base(5)
+ {
+ }
+}
diff --git a/Ubung/Limousine.cs b/Ubung/Limousine.cs
new file mode 100644
index 0000000..7176e96
--- /dev/null
+++ b/Ubung/Limousine.cs
@@ -0,0 +1,8 @@
+namespace Ubung;
+
+internal class Limousine : Auto
+{
+ public Limousine(int countDors) : base(countDors)
+ {
+ }
+}
diff --git a/Ubung/Program.cs b/Ubung/Program.cs
new file mode 100644
index 0000000..a1fe0ad
--- /dev/null
+++ b/Ubung/Program.cs
@@ -0,0 +1,73 @@
+
+
+using Ubung;
+
+// Übung 1
+Limousine limousine = new(4);
+Kombi kombi = new();
+Van van = new();
+
+// Übung 3
+var gentec = new GenTec(5);
+gentec.SetValue(3, 245);
+gentec.SetValue(2, 45);
+gentec.SetValue(1, 11);
+gentec.SetValue(4, 34);
+gentec.SetValue(0, 56);
+
+Console.WriteLine(gentec.GetType());
+Console.WriteLine(gentec.GetValue(4));
+
+var gen = new GenTec(5);
+gen.SetValue(3, 245);
+gen.SetValue(2, 45);
+gen.SetValue(1, 11);
+gen.SetValue(4, 34.9123);
+gen.SetValue(0, 56);
+
+Console.WriteLine(gen.GetType());
+Console.WriteLine(gen.GetValue(4));
+
+var genList = new GenTecList();
+genList.AddValue(245);
+genList.AddValue(3);
+genList.AddValue(25);
+genList.AddValue(24);
+
+Console.WriteLine(genList.GetType());
+Console.WriteLine(genList.GetValue(0));
+
+var genList2 = new GenTecList();
+genList2.AddValue(245);
+genList2.AddValue(3);
+genList2.AddValue(25);
+genList2.AddValue(24);
+
+Console.WriteLine(genList2.GetType());
+Console.WriteLine(genList2.GetValue(1));
+
+// Übung 4
+var rand = new Random();
+List list = new();
+
+for (int i = 0; i < 100; i++)
+{
+ list.Add(rand.Next(101));
+}
+
+var anzahl = list.Count(o => o < list.Average());
+Console.WriteLine(anzahl);
+
+
+var rooms = new Dictionary
+{
+ { "618", new [] { "Tim", "Ute"} },
+ { "621", new [] { "Hans", "Jakob"} },
+};
+
+Console.WriteLine(SearchStudent(rooms, "Jakob"));
+
+string SearchStudent(Dictionary studentInClasses, string student)
+{
+ return studentInClasses.First(o => o.Value.Contains(student)).Key;
+}
\ No newline at end of file
diff --git a/Ubung/Ubung.csproj b/Ubung/Ubung.csproj
new file mode 100644
index 0000000..fd4bd08
--- /dev/null
+++ b/Ubung/Ubung.csproj
@@ -0,0 +1,10 @@
+
+
+
+ Exe
+ net9.0
+ enable
+ enable
+
+
+
diff --git a/Ubung/Van.cs b/Ubung/Van.cs
new file mode 100644
index 0000000..211730e
--- /dev/null
+++ b/Ubung/Van.cs
@@ -0,0 +1,17 @@
+namespace Ubung;
+
+internal class Van : Kombi
+{
+ private bool ladefläche = false;
+
+ public bool Ladefläche
+ {
+ get => ladefläche;
+ set
+ {
+ base.CountDors = value ? 2 : 5;
+
+ ladefläche = value;
+ }
+ }
+}